[petsc-dev] PETSC_UNUSED broken needs repair
Barry Smith
bsmith at mcs.anl.gov
Thu Aug 18 20:15:51 CDT 2011
It happily sets the attribute even though the attribute does not exist.
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