This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: Linus Torvalds <torvalds at transmeta dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: <dewar at gnat dot com>, <gcc at gcc dot gnu dot org>, <rth at redhat dot com>, <trini at kernel dot crashing dot org>
- Date: Sat, 5 Jan 2002 10:40:27 -0800 (PST)
- Subject: Re: [PATCH] C undefined behavior fix
On Sat, 5 Jan 2002, Florian Weimer wrote:
>
> The programmer didn't lay out "a" and "b" consecutively in memory, at
> least if the above code is from a C program.
In Richards example he did, by selecting sections etc for them.
> > - the C language clearly _does_ have different rules for pointer
> > arithmetic and for "integer arithmetic with cast pointers" (the first
> > one ends up being undefined and allows more aggressive optimization,
> > while the second one is implementation-defined and thus tends to
> > disallow some of those optimizations).
>
> Repeating this over and over again doesn't make it true.
Yeah yeah, too bad you can't read.
Linus