c++/7327: -isystem and template linkage
Ben Hines
bhines@alumni.ucsd.edu
Sun Nov 3 20:21:00 GMT 2002
This bug# 7327 also affects Apple's GCC on Mac OS X. Also, "idirafter"
is also affected in addition to "isystem".
To reproduce on mac os x:
in conftest.cpp:
#include <conftest.h>
int main ()
{
return 0;
}
in conftest.h in pwd:
#include <iosfwd>
Compile with:
g++ -idirafter `pwd` conftest.cpp -save-temps
OR
g++ -isystem `pwd` conftest.cpp -save-temps
RESULT:
% g++ -idirafter `pwd` conftest.cpp -save-temps
In file included from /usr/include/gcc/darwin/3.1/g++-v3/iosfwd:45,
from /Users/ben/tempbug/conftest.h:1,
from conftest.cpp:2:
/usr/include/gcc/darwin/3.1/g++-v3/bits/stringfwd.h:49: template with C
linkage
/usr/include/gcc/darwin/3.1/g++-v3/bits/stringfwd.h:57: template with C
linkage
/usr/include/gcc/darwin/3.1/g++-v3/bits/stringfwd.h:61: template with C
linkage
-snip more-
REGRESSION:
If i include <iosfwd> directly in conftest.cpp, i don't get the
problem. It has to be in a header found by isystem.
% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1161, based on gcc version 3.1
20020420 (prerelease)
% uname -a
Darwin lsanca1-ar8-4-60-073-020.lsanca1.dsl-verizon.net 6.1 Darwin
Kernel Version 6.1: Fri Sep 6 23:24:34 PDT 2002;
root:xnu/xnu-344.2.obj~2/RELEASE_PPC Power Macintosh powerpc
-Ben
More information about the Gcc-bugs
mailing list