On Tue, 11 Nov 2014, [utf-8] Dag-Erling Sm??rgrav wrote:

"Bjoern A. Zeeb" <b...@freebsd.org> writes:
This fails to compile on all gcc platforms.

cc1: warnings being treated as errors
/scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:
In function 'rijndael_padEncrypt':
/scratch/tmp/bz/head.svn/sys/modules/geom/geom_bde/../../../crypto/rijndael/rijndael-api-fst.c:236:
warning: cast discards qualifiers from pointer target type
[...]

The code is quite clearly wrong.  Why doesn't clang complain?

-Wcast-qual is broken (has no effect) with clang.  This is incompatible
with gcc and defeats the reason of existence of -Wcast-qual.

-Wcast-qual is not a very good warning option since the official way
to remove qualifiers in C is to cast them away.  Casting them away is
better than using the __DECONST() abomination.  The option exists
because it is too easy for sloppy code to cast away const without
really intending to or when casting away const is done intentionally
but is an error.

Bruce
_______________________________________________
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