public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/3054: string.h conditionally wrapped in namespace std
@ 2001-06-05 8:36 kreckel
0 siblings, 0 replies; 2+ messages in thread
From: kreckel @ 2001-06-05 8:36 UTC (permalink / raw)
To: gcc-gnats
>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 <iostream>
#include <string.h>
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libstdc++/3054: string.h conditionally wrapped in namespace std
@ 2001-06-08 11:38 jbuck
0 siblings, 0 replies; 2+ messages in thread
From: jbuck @ 2001-06-08 11:38 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, kreckel, nobody
Synopsis: string.h conditionally wrapped in namespace std
State-Changed-From-To: open->closed
State-Changed-By: jbuck
State-Changed-When: Fri Jun 8 11:38:48 2001
State-Changed-Why:
This bug is a duplicate of bug libstdc++/2992.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3054&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-08 11:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-05 8:36 libstdc++/3054: string.h conditionally wrapped in namespace std kreckel
2001-06-08 11:38 jbuck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).