This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12272] using declaration shadows namespace
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2003 01:39:59 -0000
- Subject: [Bug c++/12272] using declaration shadows namespace
- References: <20030914020800.12272.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12272
------- Additional Comments From gdr at integrable-solutions dot net 2003-09-15 01:39 -------
Subject: Re: using declaration shadows namespace
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Here's a cut-down testcase:
| ----------------------------------------------
| namespace NS1 {
| namespace NS2 {
| };
| }
| namespace NS2 {
| class X;
| }
| using namespace NS1;
|
| typedef NS2::X Y;
^^^
"NS2" is ambiguous: NS1::NS2 or ::NS2?
| --------------------------------
|
| It fails like so with 3.3:
| tmp/g> ~/bin/gcc-3.3/bin/c++ -c x.cc
| x.cc:10: error: syntax error before `::' token
bogus diagnostic message.
| I think it should pass.
No, it should not. But the diagnostic message is close to useless.
-- Gaby