This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: signed is undefined and has been since 1992 (in GCC)
- From: Robert Dewar <dewar at adacore dot com>
- To: Michael Veksler <VEKSLER at il dot ibm dot com>
- Cc: Andrew Pinski <pinskia at physics dot uc dot edu>, gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Tue, 28 Jun 2005 05:48:58 -0400
- Subject: Re: signed is undefined and has been since 1992 (in GCC)
- References: <OFC701B61A.2D69278F-ONC225702E.00175947-C225702E.0017D92F@il.ibm.com>
Michael Veksler wrote:
I don't mind MAX_INT+1 being undefined by gcc. I object to drawing from
"undefined" to conclude that is_modulo should be true. This does not
make a practical sense. Drawing conclusions from "undefined" can yield
absurd results.
Yes, but trying to define what you mean by disallowing "drawing
conclusions" is close to impossible. You can say that informally,
and we sort of know what you mean, but if you try to formalize
this at the level of standardized semantics you will run into
trouble. This reflects the fact that the notion of forbidding
it is not clear, it will be like pornography and the supreme
court. For a given example, you will know whether you like it
or not, but you will find it hard to generalize the rule.