On 01/28/2011 12:53 PM, Chad Versace wrote:
MSVC does not support C99. To prevent GCC users from breaking the MSVC
build, explicit errors must be set.
---
src/mesa/Makefile | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 25e7cce..bb4d04d 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -21,8 +21,12 @@ MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES)
# append include dirs
MESA_CPPFLAGS += $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
+# MSVC does not support C99. To prevent GCC users from breaking the MSVC
+# build, explicit errors must be set.
+C_ERROR_FLAGS := -Werror=declaration-after-statement
+
# tidy compiler flags
-CFLAGS := $(filter-out $(DEFINES), $(CFLAGS))
+CFLAGS := $(filter-out $(DEFINES), $(CFLAGS)) $(C_ERROR_FLAGS)
CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS))
# LLVM is needed for the state tracker
I think this should be done up in the configure.ac file. Otherwise
we're assuming gcc in the Makefile.
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev