svn commit: r333860 - head/sys/kern

Matthew Macy mmacy at freebsd.org
Thu May 24 16:34:50 UTC 2018


>
> False positives are compiler bugs.

No they're not. No more than missed optimization opportunities.
They're limitations in the control flow analysis.

>
> It does happen, with GCC more than with clang, that the compiler has too
> many bugs and it's a bad practice to pessimize code to work around them.

It doesn't pessimize the compiled output. It may make the code less
readable in the opinion of some.  I've found that 10% of the warnings
were actually legitimate issues. It's unfortunate that the majority
are just noise that have to be waded through.

>  At
> very least you should add a comment when adding unnecessary initializations,
> something like /* workaround GCC */, but dropping broken warnings is best.

That's legitimate.


More information about the svn-src-all mailing list