[klibc] -fno-strict-overflow in klibc?
Mike Waychison
mikew at google.com
Wed May 26 13:02:32 PDT 2010
Sam Ravnborg wrote:
> On Wed, May 26, 2010 at 11:57:31AM -0700, Mike Waychison wrote:
>> Toying around with new compilers and old kernels, we noticed that the
>> upstream kernel over that last year or so added -fno-strict-overflow to
>> CFLAGS so that newer compilers would allow overflow detection on pointer
>> arithmetic (and integer arithmetic) to continue working.
>>
>> Should we be setting this flag for klibc as well?
>
> Obvious question.
> How many new warnings does it trigger now?
>
> If zero then yes.
> If one or more then no until they are fixed, or at least most are fixed.
Well, I'm not 100% certain we should expect warnings. For instance,
compiling older kernels that didn't have this option set in CFLAGS
resulted in code getting eliminated as 'dead code' without a warning
emitted.
More information about the klibc
mailing list