>>>>> "Geoffrey" == Geoffrey Keating <[EMAIL PROTECTED]> writes:

 Geoffrey> Paul Koning <[EMAIL PROTECTED]> writes:
 >> Still, never mind what the C spec appears to say, optimizing away
 >> the cast cannot possibly what the user intended.

 Geoffrey> The user might have written a routine which takes a
 Geoffrey> 'volatile int *', with the intent that routine would be
 Geoffrey> used on both regular and volatile 'int's.  The compiler
 Geoffrey> might be able to see (after inlining) that this particular
 Geoffrey> instance does not actually refer to a volatile variable,
 Geoffrey> and so be able to optimise the routine better.

Ok, so every once in a while you might run into a case like that, and
you could very slightly speed up that case at the expense of
introducing a hairy bug into all other cases.  Not a good tradeoff at
all.

        paul

Reply via email to