This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] C undefined behavior fix


On Wed, Jan 02, 2002 at 04:07:39PM -0800, Richard Henderson wrote:
> On Wed, Jan 02, 2002 at 05:01:18PM -0700, Tom Rini wrote:
> > Yes, but doesn't -ffreestanding imply that gcc _can't_ assume this is
> > the standard library...
> 
> Ignore strcpy.  Yes, that's what visibly causing a failure here,
> but the bug is in the funny pointer arithmetic.  Leave that in
> there and the compiler _will_ bite your ass sooner or later.

Er, which part of the 'funny pointer arithmetic' ?  I take it you aren't
a fan of the 'change to
memcpy(namep,RELOC("linux,phandle"),sizeof("linux,phandle"));' fix.
We need to do funny things here, and thus need a way to tell gcc to just
do what we're saying.

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]