This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C undefined behavior fix
- From: Alan Cox <alan at lxorguk dot ukuu dot org dot uk>
- To: trini at kernel dot crashing dot org (Tom Rini)
- Cc: jtv at xs4all dot nl (jtv), rth at redhat dot com (Richard Henderson),velco at fadata dot bg (Momchil Velikov), linux-kernel at vger dot kernel dot org,gcc at gcc dot gnu dot org, linuxppc-dev at lists dot linuxppc dot org,Franz dot Sirl-kernel at lauterbach dot com (Franz Sirl),paulus at samba dot org (Paul Mackerras),benh at kernel dot crashing dot org (Benjamin Herrenschmidt),minyard at acm dot org (Corey Minyard)
- Date: Thu, 3 Jan 2002 00:25:18 +0000 (GMT)
- Subject: Re: [PATCH] C undefined behavior fix
> Yes, but doesn't -ffreestanding imply that gcc _can't_ assume this is
> the standard library, and that strcpy _might_ not be what it thinks, and
> to just call strpy?
strcpy is part of the C standard. You'd need a -fits-not-c-its-linux
> We aren't saying this is always a bad thing, but what if we want to turn
> off a built-in optimization? Unless -ffreestanding stops implying
> -fno-builtin (maybe we could just add -fno-builtin for this one file..),
> this line should be fine.
If you want a strcpy that isnt strcpy then change its name or use a
different language 8)