From a0545c413330d5993806e8d7956a1c254d77020b Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 19 Mar 2009 18:52:38 +0000 Subject: Moved -pedantic from Makefile to the end of configure script svn-id: r39530 --- Makefile | 2 +- configure | 49 ++++++++++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 2395511ee3..4555b46430 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ CXXFLAGS:= -Wall $(CXXFLAGS) # Turn off some annoying and not-so-useful warnings CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder # Enable even more warnings... -CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align +CXXFLAGS+= -Wpointer-arith -Wcast-qual -Wcast-align CXXFLAGS+= -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings # Disable RTTI and exceptions, and enabled checking of pointers returned by "new" diff --git a/configure b/configure index 15658059da..5a5f0e60bd 100755 --- a/configure +++ b/configure @@ -972,27 +972,6 @@ if test "$cxx_verc_fail" = yes ; then exit 1 fi -# -# Do CXXFLAGS now we know the compiler version -# -if test "$_cxx_major" -ge "3" ; then - case $_host_os in - mingw* | cygwin* | dreamcast) - CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" - ;; - *) - CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" - ;; - esac - add_line_to_config_mk 'HAVE_GCC3 = 1' -fi; - -if test "$_cxx_major" -ge "4" && test "$_cxx_minor" -ge "3" ; then - CXXFLAGS="$CXXFLAGS -Wno-parentheses -Wno-empty-body" -else - CXXFLAGS="$CXXFLAGS -Wconversion" -fi; - # # Check for endianness # @@ -1754,6 +1733,34 @@ case $_backend in ;; esac +# +# Do CXXFLAGS now we know the compiler version +# +if test "$_cxx_major" -ge "3" ; then + case $_host_os in + mingw* | cygwin* | dreamcast) + CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" + ;; + *) + CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" + ;; + esac + add_line_to_config_mk 'HAVE_GCC3 = 1' +fi; + +if test "$_cxx_major" -ge "4" && test "$_cxx_minor" -ge "3" ; then + CXXFLAGS="$CXXFLAGS -Wno-parentheses -Wno-empty-body" +else + CXXFLAGS="$CXXFLAGS -Wconversion" +fi; + +# Some platforms use certain GNU extensions in header files +case $_host_os in +*) + CXXFLAGS="$CXXFLAGS -pedantic" + ;; +esac + # # Engine selection # -- cgit v1.2.3