[petsc-dev] PETSC_UNUSED broken needs repair

Barry Smith bsmith at mcs.anl.gov
Sat Aug 20 21:47:21 CDT 2011


  Matt,

     How do I fix this?  You want a release, you have to help us with all these bugs.


   Barry

On Aug 20, 2011, at 9:43 PM, Jed Brown wrote:

> On Thu, Aug 18, 2011 at 18:15, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>  It happily sets the attribute even though the attribute does not exist.
> 
> Well, you wrote that code. ;-)
> 
> I think you only need checkCompile() and I guess it should check for warnings about unsupported attributes.
>  
> 
> 
> TEST configureUnused from PETSc.Configure(/export/home/petsc/petsc-dev-3/config/PETSc/Configure.py:528)
> TESTING: configureUnused from PETSc.Configure(/export/home/petsc/petsc-dev-3/config/PETSc/Configure.py:528)
>  Sees if __attribute((unused)) is supported
>        Pushing language Cxx
> sh: /export/home/petsc/soft/mpich2-1.2.1p1/bin/mpicxx -c -o /tmp/petsc-VAqamh/PETSc.Configure/conftest.o -I/tmp/petsc-VAqamh/config.setCompilers -I/tmp/petsc-VAqamh/config.compilers -I/tmp/petsc-VAqamh/config.functions -I/tmp/petsc-VAqamh/config.types -I/tmp/petsc-VAqamh/PETSc.utilities.missing -I/tmp/petsc-VAqamh/config.libraries -I/tmp/petsc-VAqamh/PETSc.Configure -I/tmp/petsc-VAqamh/PETSc.utilities.scalarTypes  -g     /tmp/petsc-VAqamh/PETSc.Configure/conftest.cc
> Executing: /export/home/petsc/soft/mpich2-1.2.1p1/bin/mpicxx -c -o /tmp/petsc-VAqamh/PETSc.Configure/conftest.o -I/tmp/petsc-VAqamh/config.setCompilers -I/tmp/petsc-VAqamh/config.compilers -I/tmp/petsc-VAqamh/config.functions -I/tmp/petsc-VAqamh/config.types -I/tmp/petsc-VAqamh/PETSc.utilities.missing -I/tmp/petsc-VAqamh/config.libraries -I/tmp/petsc-VAqamh/PETSc.Configure -I/tmp/petsc-VAqamh/PETSc.utilities.scalarTypes  -g     /tmp/petsc-VAqamh/PETSc.Configure/conftest.cc
> sh:
> Possible ERROR while running compiler: error message = {"/tmp/petsc-VAqamh/PETSc.Configure/conftest.cc", line 3: Warning: attribute unused is unsupported and will be skipped..
> 1 Warning(s) detected.
> }
> Source:
> #include "confdefs.h"
> #include "conffix.h"
> __attribute((unused)) static int myfunc(void){ return 1;}
> 
> int main() {
> int i = myfunc();
> ;
>  return 0;
> }
>                Pushing language CXX
>                Popping language CXX
> sh: /export/home/petsc/soft/mpich2-1.2.1p1/bin/mpicxx  -o /tmp/petsc-VAqamh/PETSc.Configure/conftest    -g  /tmp/petsc-VAqamh/PETSc.Configure/conftest.o  -ldl
> Executing: /export/home/petsc/soft/mpich2-1.2.1p1/bin/mpicxx  -o /tmp/petsc-VAqamh/PETSc.Configure/conftest    -g  /tmp/petsc-VAqamh/PETSc.Configure/conftest.o  -ldl
> sh:
>        Defined "UNUSED" to "__attribute((unused))"
>        Popping language Cxx
> 
> 




More information about the petsc-dev mailing list