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 31236c4b01613ec0c9ebb1c4ef82122fea205b9b..ecdeef06fdfaf71048b8968e25640b84e878053d 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 26ba309d6868ddf81dfae94bbf53416ba6ad18b9..01a374e3633b11b8092d2c5fc43ac67937c7c18e 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: