public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/2989: libstdc++ breaks compilation of strcpy
@ 2001-05-29 5:56 dmuell
0 siblings, 0 replies; only message in thread
From: dmuell @ 2001-05-29 5:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 2989
>Category: libstdc++
>Synopsis: ambiguous overload of strcpy when including iostream
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue May 29 05:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Dirk A. Mueller
>Release: 3.0 20010529 (prerelease)
>Organization:
>Environment:
System: Linux 2.4.4
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --enable-languages=c,c++ --enable-shared --enable-threads --enable-c99 --enable-long-long
>Description:
this code does no longer compile:
=== Cut ===
#include <string.h>
#include <iostream>
using namespace std;
int main() {
char foo[300];
char* bar = "foo";
strcpy(foo, bar);
}
=== Cut ===
the error message is:
call of overloaded `strcpy(char[300], char*&)' is ambiguous
/usr/include/string.h:78: candidates are: char* strcpy(char*, const char*)
/usr/local/include/g++-v3/bits/std_cstring.h:104: char*
std::strcpy(char*, const char*)
it worked fine with the gcc of a few days ago and with gcc 2.95.3 as all
previous releases (of course, as they didn't handle namespace conflicts)
>How-To-Repeat:
>Fix:
none known except removing the "using namespace" directive.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-05-29 5:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-29 5:56 libstdc++/2989: libstdc++ breaks compilation of strcpy dmuell
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).