From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7377 invoked by alias); 29 Jan 2012 14:12:50 -0000 Received: (qmail 7366 invoked by uid 22791); 29 Jan 2012 14:12:49 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 29 Jan 2012 14:12:33 +0000 From: "potswa at mac dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/52040] New: TR1 is not accessible using compiler flags alone Date: Sun, 29 Jan 2012 14:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: potswa at mac dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg03397.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52040 Bug #: 52040 Summary: TR1 is not accessible using compiler flags alone Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: potswa@mac.com C++ TR1 (N1836) =C2=A71.3/3-4 says 3. =E2=80=A6 Users should be required to take explicit action to have acces= s to library extensions. 4. It is recommended either that additional declarations in standard header= s be protected with a macro that is not defined by default, or else that all extended headers, including both new headers and parallel versions of stand= ard headers with nonstandard declarations, be placed in a separate directory th= at is not part of the default search path. The "explicit action" is left open-ended, but the document suggests that me= re inclusion of a nonstandard header should fail. GCC interprets the explicit action to be prefixing the header name with "tr= 1/". This is a change to source code, whereas other platforms such as MSVC allow= TR1 to be used without altering the header names. An alternative way to use GCC would be to pass "-isystem /usr/include/c++/.../tr1" =E2=80=94 instead of modifying the header name, m= odify the search path. This fails because, for example, includes the line #include There are two ways to fix this. One was actually used in some other headers circa GCC 4.2, and would read: #include "../cfloat" The other is perhaps less clean, but opinions may differ: #include_next Applying either of these fixes across the tr1/ directory should improve sou= rce compatibility.