Re: [PATCH] C undefined behavior fix

Alan Cox
2002-01-02T11:38:17Z

> Why is Linux not using this? It sounds very appropriate. The only
> things the manpage mentions that -fno-builtin would inhibit from being
> optimized are memcpy() and alloca(). memcpy() has its own assembly

There are others in newer gcc's, and on the whole gcc does a very good
job with them, so IMHO it is worth being nice to gcc to get the advantages.

> I only see it being used a bit in the S/390 code, where the gcc
> optimizations could quite possibly break something. I think
> -ffreestanding definately should be used by the kernel to prevent gcc
> from messing with its code in broken ways.

-ffreestanding for the compiler versions that support it can be added to
arch specific flags anyway