mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Rewritten configure test for -Wdeclaration-after-statement to be more accurate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30133 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
05a78f7b78
commit
c7ec262cbf
3 changed files with 7957 additions and 8181 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* configure.ac: Rewritten test for -Wdeclaration-after-statement
|
||||
to be more accurate.
|
||||
* configure: Regenerated.
|
||||
|
||||
2010-04-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSObject.m:
|
||||
|
|
21
configure.ac
21
configure.ac
|
@ -1788,16 +1788,23 @@ AC_SUBST(INCLUDE_FLAGS)
|
|||
AC_SUBST(LDIR_FLAGS)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for C99ism warnings
|
||||
# Check for -Wdeclaration-after-statement
|
||||
#--------------------------------------------------------------------
|
||||
AC_PROG_CC_C99
|
||||
# If the compiler supports c99 then we assume it supports the option to
|
||||
# warn about declarations after statements.
|
||||
if test "no" = "$ac_cv_prog_cc_c99"; then
|
||||
WARN_FLAGS=-Wall
|
||||
else
|
||||
AC_MSG_CHECKING(whether the compiler supports -Wdeclaration-after-statement)
|
||||
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],HAS_W_DECL_AFTER_STATEMENT=yes,HAS_W_DECL_AFTER_STATEMENT=no)
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
|
||||
AC_MSG_RESULT($HAS_W_DECL_AFTER_STATEMENT)
|
||||
|
||||
if test x"$HAS_W_DECL_AFTER_STATEMENT" = x"yes"; then
|
||||
WARN_FLAGS="-Wall -Wdeclaration-after-statement"
|
||||
else
|
||||
WARN_FLAGS=-Wall
|
||||
fi
|
||||
|
||||
AC_SUBST(WARN_FLAGS)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue