[petsc-dev] nightly builds

Jed Brown jedbrown at mcs.anl.gov
Fri Jul 5 17:38:47 CDT 2013


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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130705/e3c059d5/attachment.sig>


More information about the petsc-dev mailing list