From mboxrd@z Thu Jan 1 00:00:00 1970 From: kreckel@ginac.de To: gcc-gnats@gcc.gnu.org Subject: libstdc++/3054: string.h conditionally wrapped in namespace std Date: Tue, 05 Jun 2001 08:36:00 -0000 Message-id: <20010605153416.20468.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00129.html List-Id: >Number: 3054 >Category: libstdc++ >Synopsis: string.h conditionally wrapped in namespace std >Confidential: no >Severity: critical >Priority: high >Responsible: unassigned >State: open >Class: mistaken >Submitter-Id: net >Arrival-Date: Tue Jun 05 08:36:20 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Richard Kreckel >Release: gcc version 3.0 20010605 (prerelease) >Organization: >Environment: Debian GNU/Linux potato on i386 >Description: It seems like the depr.c.header string.h is sometimes (but not always) wrapped inside namespace std. This should always happen to the cstring header, but never to string.h, according to ISO/IEC 14882:1998, Annex D, secton 5. This code does not compile, thus exhibiting the problem: #include #include int main(void) { const char * a = "ll"; const char * b = "hello"; if (::strcmp(a,b)) // changing to std::strcmp works. printf("yes\n"); else printf("no\n"); return 0; } Also, I noted that reversing the two include directives seems to fix the problem. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: