[Mesa-dev] [PATCH 3/4] configure.ac: warn when declarations follow code
Brian Paul
brianp at vmware.com
Wed Jun 26 12:50:39 PDT 2013
Since it's an error with MSVC.
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index 6832b0d..16f11aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,6 +209,11 @@ if test "x$GCC" = xyes; then
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-builtin-memcmp"
CFLAGS="$CFLAGS -fno-builtin-memcmp"
+
+ # Warn when declarations are found after code (an error with MSVC)
+ # Available in gcc 3.0 and later
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -Wdeclaration-after-statement"
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
fi
if test "x$GXX" = xyes; then
CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -Wall"
--
1.7.10.4
More information about the mesa-dev
mailing list