Summary: | -isystem and template linkage | ||
---|---|---|---|
Product: | gcc | Reporter: | hoel |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | abrahams, austern, bhines, gcc-bugs, hoel, numien, patrick.frants |
Priority: | P3 | Keywords: | rejects-valid |
Version: | 3.1 | ||
Target Milestone: | --- | ||
Host: | Target: | powerpc-apple-darwin | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2004-03-06 05:05:47 |
Description
hoel
2002-07-16 06:46:02 UTC
Fix: not known Greetings Berthold Höllmann This email contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this email is unauthorized. Any use of this email by not intended recipients like copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this email is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this email. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. State-Changed-From-To: open->analyzed State-Changed-Why: One way gives your headers extern "C" wrappers, the other doesn't. I'm not sure what the fix is, or even if it should be fixed. From: =?ISO-8859-15?Q?Berthold_H=F6llmann?= <hoel@germanlloyd.org> To: <neil@gcc.gnu.org> Cc: <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org> Subject: Re: c++/7327: -isystem and template linkage Date: 13 Aug 2002 13:52:50 +0200 neil@gcc.gnu.org writes: > Old Synopsis: strange error through using -isystem > New Synopsis: -isystem and template linkage >=20 > State-Changed-From-To: open->analyzed > State-Changed-By: neil > State-Changed-When: Tue Aug 13 04:12:48 2002 > State-Changed-Why: > One way gives your headers extern "C" wrappers, the other > doesn't. I'm not sure what the fix is, or even if it should be fixed. >=20 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview%20audit-trail&database=3D= g cc&pr=3D7327 >=20 If I generate the preprocessed files using g++ -E -isystem /home/hoel/work/boost/boost err.cxx -o erra and g++ -E -I /home/hoel/work/boost/boost err.cxx -o errb and call=20 diff err? | grep -v "^[<>] #" | grep -v "\---" afterwards, the only output are the different lines. So why are the C++ lines wrapped extern "C" using -isystem but not using -I? I'm also not sure what the fix is, but shure it should be fixed. Greetings Berthold --=20 Dipl.-Ing. Berthold H=F6llmann __ Address: hoel@germanlloyd.org G / \ L Germanischer Lloyd phone: +49-40-36149-7374 -+----+- Vorsetzen 32/35 P.O.Box 111606 fax : +49-40-36149-7320 \__/ D-20459 Hamburg D-20416 Hamburg This email contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this email is unauthorized. Any use of this email by not intended recipients like copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this email is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this email.=20 GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc.=20 Responsible-Changed-From-To: unassigned->jason Responsible-Changed-Why: Becase I know Jason will know what I mean when I say what I wrote in the release-note field... (not sure where to add more info) From: Ben Hines <bhines@alumni.ucsd.edu> To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, hoel@germanlloyd.org, gcc-bugs@gcc.gnu.org, jason@gcc.gnu.org Cc: Subject: Re: c++/7327: -isystem and template linkage Date: Sun, 3 Nov 2002 20:21:19 -0800 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 From: Patrick Frants <patrick.frants@quintiq.com> To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, hoel@germanlloyd.org, jason@gcc.gnu.org Cc: Subject: Re: c++/7327: -isystem and template linkage Date: Fri, 21 Feb 2003 22:31:34 +0100 This one drove me *crazy* until I finally found this bug report :-) Any chance it is going to be fixed shortly? :-) Patrick http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- trail&database=gcc&pr=7327 -- Patrick Frants Software Architect Quintiq Tel: +31 (0)73 691 07 39 Mob: +31 (0)654 23 39 67 patrick.frants@quintiq.com www.quintiq.com The problem seems to be that Solaris and Darwin need a #define NO_IMPLICIT_EXTERN_C in their config headers. It's probably past time to flip the default for that setting. Subject: Re: -isystem and template linkage
> The problem seems to be that Solaris and Darwin need a
>
> #define NO_IMPLICIT_EXTERN_C
>
> in their config headers. It's probably past time to flip the default for that
> setting.
The problem with this on Darwin is that the mach headers are not C++ safe.
I do not know why solaris is not done that way though.
Thanks,
Andrew Pinski
Subject: Re: -isystem and template linkage On 29 Aug 2003 21:13:39 -0000, "pinskia at physics dot uc dot edu" <gcc-bugzilla@gcc.gnu.org> wrote: > The problem with this on Darwin is that the mach headers are not C++ safe. Well, then Darwin users are out of luck. Jason *** Bug 11285 has been marked as a duplicate of this bug. *** Subject: Bug 7327 CVSROOT: /cvs/gcc Module name: gcc Changes by: jason@gcc.gnu.org 2003-09-02 21:45:20 Modified files: gcc : ChangeLog gcc/config/sparc: sol2.h Log message: PR c++/7327 * config/sparc/sol2.h (NO_IMPLICIT_EXTERN_C): Define. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.945&r2=2.946 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sol2.h.diff?cvsroot=gcc&r1=1.53&r2=1.54 The remaining bug here is (reportedly) in the Darwin headers, which we can't fix. I've added Matt Austern to the CC list in the hopes that someone at Apple will fix that problem so that we can define NO_IMPLICIT_EXTERN_C for Darwin as well. I hear this is trying to get fixed for the next release of Mac OS X (aka darwin). |