diff options
authorCarlos Garcia Campos <>2010-06-01 11:35:34 +0200
committerCarlos Garcia Campos <>2010-06-01 11:35:34 +0200
commit64405a78fdce7e028d91bdc68ab497d4c8a53bf0 (patch)
parent8e28de56006377184aa2ac2220afd82c9a2431d1 (diff)
Add --enable-iso-c configure option disabled by default
It uses, if available, -ansic and -pedantic flags. See bug #27735
1 files changed, 7 insertions, 1 deletions
diff --git a/ b/
index acd6b9a..827a7be 100644
--- a/
+++ b/
@@ -158,7 +158,7 @@ dnl skipped and all flags rechecked. So there's no need to do anything
dnl else. If for any reason you need to force a recheck, just change
dnl MAYBE_WARN in an ignorable way (like adding whitespace)
-MAYBE_WARN="-Wall -Wextra -pedantic \
+MAYBE_WARN="-Wall -Wextra \
-Wsign-compare -Werror-implicit-function-declaration \
-Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
@@ -168,6 +168,12 @@ MAYBE_WARN="-Wall -Wextra -pedantic \
-Wno-missing-field-initializers -Wno-unused-parameter \
-Wno-attributes -Wno-long-long -Winline"
+ AC_HELP_STRING([--enable-iso-c], [Try to warn if code is not ISO C ]),,[enable_iso_c=no])
+if test "x$enable_iso_c" != "xno"; then
+ MAYBE_WARN="$MAYBE_WARN -ansi -pedantic"
# invalidate cached value if MAYBE_WARN has changed
if test "x$spectre_cv_warn_maybe" != "x$MAYBE_WARN"; then