scons: Promote declaration-after-statement to error. Detect more warnings.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 13 Mar 2009 16:21:30 +0000 (16:21 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 16 Mar 2009 12:01:44 +0000 (12:01 +0000)
scons/gallium.py
scons/generic.py

index 31236c4..ecdeef0 100644 (file)
@@ -330,11 +330,15 @@ def generate(env):
             ]
         if env['machine'] == 'x86_64':
             cflags += ['-m64']
+        # See also:
+        # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
         cflags += [
+            '-Werror=declaration-after-statement',
             '-Wall',
             '-Wmissing-prototypes',
+            '-Wmissing-field-initializers',
+            '-Wpointer-arith',
             '-Wno-long-long',
-            '-Wdeclaration-after-statement',
             '-ffast-math',
             '-std=gnu99',
             '-fmessage-length=0', # be nice to Eclipse
index 26ba309..01a374e 100644 (file)
@@ -405,13 +405,17 @@ def generate(env):
             ]
         if env['machine'] == 'x86_64':
             ccflags += ['-m64']
+        # See also:
+        # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
         ccflags += [
+            '-Werror=declaration-after-statement',
             '-Wall',
             '-Wmissing-prototypes',
+            '-Wmissing-field-initializers',
+            '-Wpointer-arith',
             '-Wno-long-long',
-            '-Wdeclaration-after-statement',
             '-ffast-math',
-            '-pedantic',
+            '-std=gnu99',
             '-fmessage-length=0', # be nice to Eclipse
         ]
     if msvc: