This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where does the C standard describe overflow of signed integers?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]