public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9726: namespace typedef hides global
@ 2003-02-17 23:54 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-02-17 23:54 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, joerg.richter, nobody
Synopsis: namespace typedef hides global
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Feb 17 23:54:58 2003
State-Changed-Why:
Confirmed with all versions of gcc since 2.95 and up to
today's mainline. The error message is profoundly unhelpful.
I think this is a duplicate of another report which I can't
seem to find right now...
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9726
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/9726: namespace typedef hides global
@ 2003-02-17 16:06 joerg.richter
0 siblings, 0 replies; 2+ messages in thread
From: joerg.richter @ 2003-02-17 16:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 9726
>Category: c++
>Synopsis: namespace typedef hides global
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 17 16:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: joerg.richter@pdv-fs.de
>Release: gcc3.2.1
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
compile following code and you will get the error at "foo a;" in main.
-----------------
class foo
{};
namespace bar
{
typedef ::foo foo;
}
using namespace bar;
int main()
{
foo a; // `foo' undeclared (first use this function)
}
>How-To-Repeat:
>Fix:
replacing the "typedef" with an "using" solves the problem
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-17 23:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-17 23:54 c++/9726: namespace typedef hides global bangerth
-- strict thread matches above, loose matches on Subject: below --
2003-02-17 16:06 joerg.richter
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).