RFC: (Unconditionally) enable -fno-strict-overflow for kernel builds

Eitan Adler lists at eitanadler.com
Sun Dec 1 04:39:17 UTC 2013


On Sat, Nov 30, 2013 at 11:26 PM, Peter Wemm <peter at wemm.org> wrote:
> On Sat, Nov 30, 2013 at 4:33 PM, Adrian Chadd <adrian at freebsd.org> wrote:
> [..]
>> Are you able to have clang/llvm/gcc tell us where/when code is relying
>> on undefined behaviour? So we can, like, fix them?
>
> It wasn't all that long ago that we had this wonderful thing called
> -Werror and had a clean kernel build.
>
> The problem is that gcc and clang have different warning sets.  I seem
> to recall we had -Werror on for gcc and off for clang.  IMHO it would
> be more useful to do it the other way around.

Not all cases can be caught by static analysis.  They would all be
caught be the integer sanitizer.  However, these have not yet been
ported to FreeBSD.





-- 
Eitan Adler


More information about the freebsd-current mailing list