summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e6278d32e5..508d295ebc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -435,7 +435,19 @@ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wold-style-definition, C)
# some Xcode versions that came with Mac OS X 10.5) complain about
# that.
#
-AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshadow, C)
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshadow, C,
+ [
+extern int atoi(char *p);
+
+int
+foo(char *p)
+{
+ int (*fptr)(char *p) = atoi;
+
+ return fptr(p) * 2;
+}
+ ],
+ [warns about variables in function declarations shadowing other variables])
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-error=unused-but-set-variable) ## for now
#
# Use the faster pre gcc 4.5 floating point precision if available;