aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2016-10-04 12:36:30 -0400
committerGreg Hudson <ghudson@mit.edu>2016-10-06 11:05:08 -0400
commit993c7c313366f3bcb86b695d6d3b0355fbc53d3f (patch)
tree2071b1086a4055287624dc111663df6c3ce6b7a7
parent66ae03f07dfe2ea876965ece14558c8fb253cb45 (diff)
downloadkrb5-993c7c313366f3bcb86b695d6d3b0355fbc53d3f.zip
krb5-993c7c313366f3bcb86b695d6d3b0355fbc53d3f.tar.gz
krb5-993c7c313366f3bcb86b695d6d3b0355fbc53d3f.tar.bz2
Error on discarded qualifiers in gcc
If a function call passes a const pointer to a function accepting the same pointer type without the const qualifier, that should be treated as an erorr if possible. In sufficiently recent gcc, pass -Werror=discarded-qualifiers. (In clang, this is already covered by -Werror=incompatible-pointer-types which we recently added.)
-rw-r--r--src/aclocal.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index b9f9d2a..bd2eb48 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -526,7 +526,7 @@ if test "$GCC" = yes ; then
TRY_WARN_CC_FLAG(-Wno-format-zero-length)
# Other flags here may not be supported on some versions of
# gcc that people want to use.
- for flag in overflow strict-overflow missing-format-attribute missing-prototypes return-type missing-braces parentheses switch unused-function unused-label unused-variable unused-value unknown-pragmas sign-compare newline-eof error=uninitialized error=pointer-arith error=int-conversion error=incompatible-pointer-types ; do
+ for flag in overflow strict-overflow missing-format-attribute missing-prototypes return-type missing-braces parentheses switch unused-function unused-label unused-variable unused-value unknown-pragmas sign-compare newline-eof error=uninitialized error=pointer-arith error=int-conversion error=incompatible-pointer-types error=discarded-qualifiers ; do
TRY_WARN_CC_FLAG(-W$flag)
done
# old-style-definition? generates many, many warnings