--------
In message <20141114131512.c1...@besplex.bde.org>, Bruce Evans writes:

>I also doing like the error for:
>
>int
>foo(bar_t b)
>{
>       if (b < 0)
>               return (EINVAL);
>       ...
>}
>
>where bar_t happens to an unsigned type so the error checking is null.
>The compiler warns, and the "fix" is to make the code less robust by
>removing the error checking.

+1

The -W-competition between CLANG and GCC has run off the rails.

The basic goal seems to emit as many warnings more than the competitor
as possible, since this "proves" that your compiler is better.

Before long I fear one of the them will introduce .w files where
one can explain details like the above on pseudo-language and the
other magic comments so one can add //!warn "blablabla" comments.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
p...@freebsd.org         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to