[petsc-dev] nightly builds

Satish Balay balay at mcs.anl.gov
Fri Jul 5 23:56:10 CDT 2013


On Fri, 5 Jul 2013, Jed Brown wrote:

> Satish Balay <balay at mcs.anl.gov> writes:
> 
> > 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'])
> 
> I would probably skip the -Werror=... part and just recommend that
> developers use CFLAGS=-Werror (treat all warnings as errors).

ok - pushed '-Wdeclaration-after-statement' to next.

Satish



More information about the petsc-dev mailing list