<div class="gmail_quote">On Thu, Aug 18, 2011 at 18:15, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
  It happily sets the attribute even though the attribute does not exist.<br></blockquote><div><br></div><div>Well, you wrote that code. ;-)</div><div><br></div><div>I think you only need checkCompile() and I guess it should check for warnings about unsupported attributes.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
TEST configureUnused from PETSc.Configure(/export/home/petsc/petsc-dev-3/config/PETSc/Configure.py:528)<br>
TESTING: configureUnused from PETSc.Configure(/export/home/petsc/petsc-dev-3/config/PETSc/Configure.py:528)<br>
  Sees if __attribute((unused)) is supported<br>
        Pushing language Cxx<br>
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<br>

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<br>

sh:<br>
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..<br>
1 Warning(s) detected.<br>
}<br>
Source:<br>
#include "confdefs.h"<br>
#include "conffix.h"<br>
__attribute((unused)) static int myfunc(void){ return 1;}<br>
<br>
int main() {<br>
int i = myfunc();<br>
;<br>
  return 0;<br>
}<br>
                Pushing language CXX<br>
                Popping language CXX<br>
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<br>
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<br>
sh:<br>
        Defined "UNUSED" to "__attribute((unused))"<br>
        Popping language Cxx<br>
<br>
</blockquote></div><br>