[petsc-dev] nightly builds

Satish Balay balay at mcs.anl.gov
Fri Jul 5 12:59:04 CDT 2013


On Fri, 5 Jul 2013, Peter Brune wrote:

> -Wdeclaration-after-statement -Werror=declaration-after-statement
> 
> Is super useful and is now added to all my arches. :)

perhaps we should change configure defaults to use this?

diff --git a/config/BuildSystem/config/compilerOptions.py b/config/BuildSystem/config/compilerOptions.py
index dadc5fb..e372bb0 100644
--- a/config/BuildSystem/config/compilerOptions.py
+++ b/config/BuildSystem/config/compilerOptions.py
@@ -18,7 +18,7 @@ class CompilerOptions(config.base.Configure):
     # GNU gcc
     if config.setCompilers.Configure.isGNU(compiler) or config.setCompilers.Configure.isClang(compiler):
       if bopt == '':
-        flags.extend(['-Wall', '-Wwrite-strings', '-Wno-strict-aliasing','-Wno-unknown-pragmas'])
+        flags.extend(['-Wall', '-Wwrite-strings', '-Wno-strict-aliasing','-Wno-unknown-pragmas','-Wdeclaration-after-statement','-Werror=declaration-after-statement'])
         if self.framework.argDB['with-visibility']:
           flags.extend(['-fvisibility=hidden'])
       elif bopt == 'g':

Satish



More information about the petsc-dev mailing list