* configure.in: Add -Wdeclaration-after-statement option to CFLAGS if
gcc supports it to weed out pre ISO C99 code.
svn path=/trunk/mono/; revision=40272
+2005-02-07 Zoltan Varga <vargaz@freemail.hu>
+
+ * configure.in: Add -Wdeclaration-after-statement option to CFLAGS if
+ gcc supports it to weed out pre ISO C99 code.
+
2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
* data/net_1_1/DefaultWsdlHelpGenerator.aspx:
WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
# The runtime code does not respect ANSI C strict aliasing rules
CFLAGS="$CFLAGS -fno-strict-aliasing"
+
+ ORIG_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ AC_MSG_CHECKING(for -Wdeclaration-after-statement option to gcc)
+ AC_TRY_COMPILE([], [
+ void main () { }
+ ], [
+ AC_MSG_RESULT(yes)
+ ], [
+ AC_MSG_RESULT(no)
+ CFLAGS=$ORIG_CFLAGS
+ ])
else
# The Sun Forte compiler complains about inline functions that access static variables
# so disable all inlining.