[PATCH] C undefined behavior fix

Joe Buck jbuck@synopsys.COM
Fri Jan 4 17:03:00 GMT 2002


> I thought the documentatoin was pretty clear, the rule about not misusing
> integer arithmetic bla-bla seemed clearly stated to me, is that not part
> of the documentation, or have I misunderstood?

It is mathematically inconsistent with the sections that precede it.  If
you define I2P, and you define P2I, and you define PLUS, you have defined
I2P(PLUS(P2I(p),i)), because at no point is an illegal or undefined
expression created.



More information about the Gcc mailing list