This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: Joe Buck <jbuck at synopsys dot COM>
- To: dewar at gnat dot com
- Cc: torvalds at transmeta dot com, gcc at gcc dot gnu dot org, rth at redhat dot com,trini at kernel dot crashing dot org
- Date: Fri, 4 Jan 2002 17:03:11 -0800 (PST)
- Subject: Re: [PATCH] C undefined behavior fix
> 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.