Mercurial > octave
comparison configure.ac @ 22233:60faa7c85e31
don't use -Wshadow for GCC 4
* configure.ac: Omit -Wshadow from list of extra warning flags when
using GCC 4.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 08 Aug 2016 19:22:29 -0400 |
parents | 83963bad5e7d |
children | 66dd260512a4 |
comparison
equal
deleted
inserted
replaced
22232:a8fd02bc895b | 22233:60faa7c85e31 |
---|---|
2716 AC_DEFINE(ENABLE_DOCS, 1, | 2716 AC_DEFINE(ENABLE_DOCS, 1, |
2717 [Define to 1 to build Octave documentation files.]) | 2717 [Define to 1 to build Octave documentation files.]) |
2718 fi | 2718 fi |
2719 AM_CONDITIONAL([AMCOND_BUILD_DOCS], [test $ENABLE_DOCS = yes]) | 2719 AM_CONDITIONAL([AMCOND_BUILD_DOCS], [test $ENABLE_DOCS = yes]) |
2720 | 2720 |
2721 case "$GCC_VERSION" in | |
2722 *4*) | |
2723 ;; | |
2724 *) | |
2725 GCC_WSHADOW_OPTION=-Wshadow | |
2726 ;; | |
2727 esac | |
2728 | |
2721 ### Maybe add -Wall, -W, and -Wshadow to compiler flags now that we're | 2729 ### Maybe add -Wall, -W, and -Wshadow to compiler flags now that we're |
2722 ### done feature testing. | 2730 ### done feature testing. |
2723 | 2731 |
2724 GCC_EXTRA_FLAGS="-Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual" | 2732 GCC_EXTRA_FLAGS="-Wall -W $GCC_WSHADOW_OPTION -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual" |
2725 GXX_EXTRA_FLAGS="-Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual" | 2733 GXX_EXTRA_FLAGS="-Wall -W $GCC_WSHADOW_OPTION -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual" |
2726 | 2734 |
2727 try_extra_warning_flags=yes | 2735 try_extra_warning_flags=yes |
2728 | 2736 |
2729 AC_ARG_ENABLE([extra-warning-flags], | 2737 AC_ARG_ENABLE([extra-warning-flags], |
2730 [AS_HELP_STRING([--disable-extra-warning-flags], | 2738 [AS_HELP_STRING([--disable-extra-warning-flags], |
2731 [don't add -Wall, -W, -Wshadow, and -Wold-style-cast options to CFLAGS and CXXFLAGS])], | 2739 [don't add -Wall, -W, -Wformat, -Wold-style-cast, and other warning options to CFLAGS and CXXFLAGS])], |
2732 [if test "$enableval" = no; then | 2740 [if test "$enableval" = no; then |
2733 try_extra_warning_flags=no | 2741 try_extra_warning_flags=no |
2734 fi], | 2742 fi], |
2735 []) | 2743 []) |
2736 | 2744 |