signed is undefined and has been since 1992 (in GCC)

Robert Dewar dewar@adacore.com
Tue Jun 28 09:49:00 GMT 2005


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.




More information about the Gcc mailing list