Where does the C standard describe overflow of signed integers?

Avi Kivity avi@argo.co.il
Fri Jul 15 07:04:00 GMT 2005


Paul Schlie wrote:

>>In that case you may want to stick with -O0.  There are *lots* of
>>things GCC does that alter undefined cases.  How about the undefined
>>behavior when aliasing rules are violated?  Would you want to make
>>-fno-strict-aliasing be the only supported setting?
>>    
>>
>
>- Isn't the purpose of "restrict" to explicitly enable the compiler to
>  more aggressively optimize references which it may be not have been
>  able to identify it as being strictly safe?  (As opposed to it feeling
>  compelled presume potentially disastrously otherwise, without explicit
>  permission to do so?)
>  
>
"restrict" allows the compiler to make further assumptions than 
-fstrict-aliasing. with strict aliasing, the compiler assumes that an 
int pointer and a long pointer cannot refer to the same object, whereas 
"restrict" allows you to specify that two int pointers do not refer to 
the same object.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.



More information about the Gcc mailing list