public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15188] New: Ambiguity caused by 'using' is misreported
@ 2004-04-28 10:50 ghost at cs dot msu dot su
2004-04-28 11:44 ` [Bug c++/15188] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: ghost at cs dot msu dot su @ 2004-04-28 10:50 UTC (permalink / raw)
To: gcc-bugs
Compiling the following program:
namespace X {
class A {};
}
namespace Y {
class A {};
}
using X::A;
using namespace Y;
int main()
{
A a;
return 0;
}
Produces:
namespaces.cpp: In function `int main()':
namespaces.cpp:16: error: `A' undeclared (first use this function)
namespaces.cpp:16: error: (Each undeclared identifier is reported only once for
each function it appears in.)
This is clearly wrong, there are two 'A' visible at the error point. And of
course, when I comment out one of the 'using', the program compiles. If I use
to using directives "using namespace X; using namespace Y;" the error is still
the same.
Gcc version is:
gcc version 3.4.0 (Debian)
--
Summary: Ambiguity caused by 'using' is misreported
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ghost at cs dot msu dot su
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15188
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/15188] Ambiguity caused by 'using' is misreported
2004-04-28 10:50 [Bug c++/15188] New: Ambiguity caused by 'using' is misreported ghost at cs dot msu dot su
@ 2004-04-28 11:44 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-28 11:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-28 11:30 -------
This is a dup of bug 100 (one of the oldest C++ bugs).
*** This bug has been marked as a duplicate of 100 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |RESOLVED
Keywords| |diagnostic
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15188
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-28 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-28 10:50 [Bug c++/15188] New: Ambiguity caused by 'using' is misreported ghost at cs dot msu dot su
2004-04-28 11:44 ` [Bug c++/15188] " pinskia at gcc dot gnu dot org
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).