[Gnucash-changes] For gcc3.4.x,
add -Wdeclaration-after-statement warning switch.
Christian Stimming
cstim at cvs.gnucash.org
Sat May 8 06:00:52 EDT 2004
Log Message:
-----------
For gcc3.4.x, add -Wdeclaration-after-statement warning switch.
Modified Files:
--------------
gnucash:
configure.in
Revision Data
-------------
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.391
retrieving revision 1.392
diff -Lconfigure.in -Lconfigure.in -u -r1.391 -r1.392
--- configure.in
+++ configure.in
@@ -1134,6 +1134,18 @@
esac],
[ warnFLAGS="${warnFLAGS} -Werror" ])
+ # For gcc >= 3.4.x, specifically enable the new warning switch
+ # -Wdeclaration-after-statement in order to preserve source code
+ # compatibility to gcc 2.95 and other compilers.
+ GCC_VERSION=`${CC} -dumpversion`
+ if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then
+ # This is gcc >= 3.x.x
+ if test `echo ${GCC_VERSION} | cut -d. -f2` -ge 4; then
+ # This is gcc >= 3.4.x
+ warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
+ fi
+ fi
+
CFLAGS="${CFLAGS} ${warnFLAGS}"
else
@@ -1160,7 +1172,7 @@
LIBOBJS_SEDSCRIPT="s,\.[[^.]]* ,$U&,g;s,\.[[^.]]*\$\$,$U&,"
AC_SUBST(LIBOBJS_SEDSCRIPT)
-AC_OUTPUT(intl/Makefile po/Makefile.in
+AC_OUTPUT( intl/Makefile po/Makefile.in
m4/Makefile
dnl # Makefiles
Makefile
More information about the Gnucash-changes
mailing list