[petsc-dev] PETSC_UNUSED syntax?
Barry Smith
bsmith at mcs.anl.gov
Sat Dec 21 19:41:34 CST 2013
It seems some compilers don’t like applying attributes to only some variables being declared. Is this legitimate? Should we always be marking the unused variables on lines of their own? (I have no problem doing that).
/sandbox/petsc/petsc.clone-2/arch-linux-complex-gcov/bin/mpicxx -o ex10.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fprofile-arcs -ftest-coverage -g -O0 -fPIC -I/sandbox/petsc/petsc.clone-2/include -I/sandbox/petsc/petsc.clone-2/arch-linux-complex-gcov/include `pwd`/ex10.c
/sandbox/petsc/petsc.clone-2/src/ts/examples/tutorials/ex10.c: In function ‘PetscErrorCode RDIJacobian_FE(TS, PetscReal, Vec, Vec, PetscReal, _p_Mat**, _p_Mat**, MatStructure*, void*)’:
/sandbox/petsc/petsc.clone-2/src/ts/examples/tutorials/ex10.c:710:36: warning: ignoring attributes applied to ‘std::complex<double>’ after definition [-Wattributes]
PetscScalar D_R,PETSC_UNUSED rad;
/sandbox/petsc/petsc.clone-2/src/ts/examples/tutorials
request-assigned: petsc-dev PetscScalar D_R,PETSC_UNUSED rad; warning: ignoring attributes applied to ‘std::complex<double>’ after definition
More information about the petsc-dev
mailing list