public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/2977: string.h doesn't always inject names into std::
@ 2001-06-11 16:21 bkoz
0 siblings, 0 replies; 2+ messages in thread
From: bkoz @ 2001-06-11 16:21 UTC (permalink / raw)
To: bkoz, gcc-bugs, gcc-prs, nobody, snyder
Synopsis: string.h doesn't always inject names into std::
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Mon Jun 11 16:21:50 2001
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->closed
State-Changed-By: bkoz
State-Changed-When: Mon Jun 11 16:21:50 2001
State-Changed-Why:
Scott this stuff was fixed this weekend.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2977&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
* libstdc++/2977: string.h doesn't always inject names into std::
@ 2001-05-27 22:06 snyder
0 siblings, 0 replies; 2+ messages in thread
From: snyder @ 2001-05-27 22:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 2977
>Category: libstdc++
>Synopsis: string.h doesn't always inject names into std::
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Sun May 27 22:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: scott snyder
>Release: 3.0 20010525 (prerelease)
>Organization:
>Environment:
System: Linux karma 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long
>Description:
The program below doesn't compile: it appears that when used after
an #include <cstring>, then #include <string.h> doesn't get the
names injected into std::, as required by the standard.
gcc 2.95 compiles the example below without complaint, so this
could be considered a regression.
Reversing the order of the inclusions below makes the example
compile, as does adding a `using namespace std;'. (Note, however,
that if one does _both_ of these, one gets a complaint about an ambiguous
call to strchr.)
>How-To-Repeat:
--------------------------------------------------------------------------
#include <cstring>
#include <string.h>
const char* foo (const char* s)
{
return strchr (s, 'a');
}
--------------------------------------------------------------------------
$ g++ -c x.cc
x.cc: In function `const char* foo(const char*)':
x.cc:6: `strchr' undeclared (first use this function)
x.cc:6: (Each undeclared identifier is reported only once for each function it
appears in.)
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-11 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-11 16:21 libstdc++/2977: string.h doesn't always inject names into std:: bkoz
-- strict thread matches above, loose matches on Subject: below --
2001-05-27 22:06 snyder
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).