[petsc-dev] Use of '//' comments in C source

Satish Balay balay at mcs.anl.gov
Thu Sep 22 09:30:15 CDT 2011


On Thu, 22 Sep 2011, Jed Brown wrote:

> Almost all compilers accept this, but the AIX IBM compilers do not. I just
> fixed a bunch of these in petsc-3.2.
> 
> 1. NEVER use // style comments in C source.
> 
> 2. We should do a nightly with super locked-down GCC settings and/or with
> the funky AIX IBM compilers. Perhaps also add a commit hook that rejects any
> patch containing '//' comments.

The windows nightly build is supporsed to catch this. [but not wrt externalpackages]

Also I think 'gcc -std=c89' catches this - but there are lot of other
things that fail with it [perhaps some of the newer system header
files are not -std=c89 compliant] - so the builds are always broken
with it on my laptop]

Satish



More information about the petsc-dev mailing list