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: Should GCC publish a general rule/warning due to it's default presumption of undefined signed integer overflow semantics?


Andrew Pinski <pinskia@physics.uc.edu> writes:

| On Jul 1, 2005, at 12:49 AM, Gabriel Dos Reis wrote:
| 
| >
| > As I said, if you let user tell you that his loop behaves well, i.e.
| > bounds do not rely on wrapping semantics, and yet he writes his loop to
| > deceive the compiler, then he loses.  Let him choose his own poinson,
| > don't think you have to choose it for him.
| 
| They already can, that is what -fwrapv is for.

No, you completely missed the point and it would help if you read
through carefully.  The choice was about letting user tell you what he
knows/assumes about his loop bounds.  Not applying uniformly the
wrapping semantics.  

(Not counting the fact that it was pointed out -fwrapv is useful as is).

-- Gaby


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