[petsc-dev] plex crap in the repository

Tobin Isaac tisaac at ices.utexas.edu
Mon Feb 23 13:20:48 CST 2015


On Mon, Feb 23, 2015 at 12:50:33PM -0600, Tobin Isaac wrote:
> On Mon, Feb 23, 2015 at 11:39:38AM -0600, Barry Smith wrote:
> > 
> > /Users/barrysmith/Src/PETSc/arch-debug/bin/mpicc -o ex3.o -c -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -O0   -I/Users/barrysmith/Src/PETSc/include -I/Users/barrysmith/Src/PETSc/arch-debug/include -I/opt/X11/include    `pwd`/ex3.c
> > /Users/barrysmith/Src/petsc/src/dm/impls/plex/examples/tests/ex3.c:363:111: warning: variable 'aDof' is uninitialized when used here [-Wuninitialized]
> >           if (cDof != 1) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_PLIB,"Found %d anchor points: should be just one",aDof);
> >                                                                                                               ^~~~
> > 
> > What kind of terrible compiler are you using that doesn't flag this stuff?
> > 
> 
> gcc, sadly: we've stumbled across a bug where -Wuninitialized doesn't
> work if a variable is used uninitialized, but a pointer to that
> variable is passed to a function later on.  Verified in gcc 4.6
> through 4.9 on ubuntu 12.04.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65182

> 
>   Toby
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150223/b2b77ef6/attachment.sig>


More information about the petsc-dev mailing list