svn commit: r261916 - head/sys/dev/xen/console

David Chisnall theraven at FreeBSD.org
Sun Feb 16 09:05:13 UTC 2014


On 16 Feb 2014, at 04:09, Bruce Evans <brde at optusnet.com.au> wrote:

> [a long list of corner cases where the warning may not be correct]

Fortunately, the goal of compiler warnings is not to address every possible case, but rather to minimise false positives while still giving useful results.  The warning can be turned off if you are using the C preprocessor in a way designed to provide cautionary tales to young programmers, but for everyone else it makes sense to have it on by default.

Anyone using a single file as both the main file for a compilation unit and as an included file in others, deserves to have a new antipattern named after them so that their name can live in infamy, but should not in any way be allowed to influence the design of compiler warnings.

David



More information about the svn-src-head mailing list