This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: Tom Rini <trini at kernel dot crashing dot org>
- To: Richard Henderson <rth at redhat dot com>, Momchil Velikov <velco at fadata dot bg>,linux-kernel at vger dot kernel dot org, gcc at gcc dot gnu dot org,linuxppc-dev at lists dot linuxppc dot org,Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>,Paul Mackerras <paulus at samba dot org>,Benjamin Herrenschmidt <benh at kernel dot crashing dot org>,Corey Minyard <minyard at acm dot org>
- Date: Wed, 2 Jan 2002 15:05:48 -0700
- Subject: Re: [PATCH] C undefined behavior fix
- References: <87g05py8qq.fsf@fadata.bg> <20020102190910.GG1803@cpe-24-221-152-185.az.sprintbbd.net> <20020102133632.C10362@redhat.com>
On Wed, Jan 02, 2002 at 01:36:32PM -0800, Richard Henderson wrote:
> On Wed, Jan 02, 2002 at 12:09:10PM -0700, Tom Rini wrote:
> > 2) Add -ffreestanding to the CFLAGS of arch/ppc/kernel/prom.o (If this
> > optimization comes back on with this flag later on, it would be a
> > compiler bug, yes?)
>
> No. You still have the problem of using pointer arithmetic past
> one past the end of the object.
Well, the problem is that we aren't running where the compiler thinks we
are yet. So what would the right fix be for this?
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/