This is the mail archive of the gcc-patches@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: [PATCH] Document arithmetic overflow semantics


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

|     The fact that the behaviour of overflow is undefined in C, C++ and Ada
|     does not mean that "overflow cannot occur".  Quite clearly overflows do
|     occur, and the optimizers are paralyzed by the semantics in this event.
| 
| I think that's backwards.  If program in C, C++, or Ada generates an
| overflow, that program is undefined.  That means the optimizer can do
| anything it wants to the program,

including honoring stringent standards like LIA.  
We ought to be careful about what we do to programs, given C99 requirements
(and C++)'s.

-- Gaby


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