summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike McCormack <mike@atratus.org>2013-04-03 22:39:57 +1100
committerMike McCormack <mike@atratus.org>2013-04-03 22:39:57 +1100
commit6777b743d2d63d8582b538200bb182e0258078b3 (patch)
tree94b10eb5e35ddb2dc7a73983f1c7b14cc79720c5
parentbe2cebab17db3e1083405e9f40f109022f4ce0b6 (diff)
Check for -Wshadow warnings with globals
Signed-off-by: Mike McCormack <mike@atratus.org>
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ec34890e81..39d6693c5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -357,7 +357,15 @@ EFL_CHECK_COMPILER_FLAGS([EFL], [-Wall -Wextra -Wpointer-arith -Wno-missing-fiel
357EFL_CHECK_LINKER_FLAGS([EFL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed -Wl,--no-copy-dt-needed-entries]) 357EFL_CHECK_LINKER_FLAGS([EFL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed -Wl,--no-copy-dt-needed-entries])
358case "${build_profile}" in 358case "${build_profile}" in
359 dev) 359 dev)
360 EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow]) 360 dnl Check if compiler has a dodgy -Wshadow that emits errors when shadowing a global
361 AC_MSG_CHECKING([whether -Wshadow generates spurious warnings])
362 CFLAGS_save="${CFLAGS}"
363 CFLAGS="${CFLAGS} -Werror -Wshadow"
364 AC_TRY_COMPILE([int x;], [int x = 0; (void)x;],
365 [AC_MSG_RESULT([no])
366 EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow])],
367 [AC_MSG_RESULT([yes])])
368 CFLAGS="${CFLAGS_save}"
361 ;; 369 ;;
362 370
363 debug) 371 debug)