Should GCC publish a general rule/warning due to it's default presumption of undefined signed integer overflow semantics?

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Jul 1 05:02:00 GMT 2005


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



More information about the Gcc mailing list