This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16604] Bad diagnostic
- From: "gdr at acm dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2004 13:40:38 -0000
- Subject: [Bug c++/16604] Bad diagnostic
- References: <20040717082913.16604.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at acm dot org 2004-07-19 13:40 -------
Subject: Re: Bad diagnostic
bangerth at dealii dot org:
>
> ------- Additional Comments From bangerth at dealii dot org 2004-07-19
> 13:36 -------
> The real bug is that you misspelled Hide::Breaker: it is only declared
> with the lowercase name Hide::breaker.
>
> This is the testcase:
> -------------------
> namespace NS {}
>
> class X {
> NS::NonExistent x;
> };
> -------------------
>
> g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c -w x.cc
> x.cc:4: error: using-declaration for non-member at class scope
> x.cc:4: error: expected `;' before "x"
>
> This is already fixed in mainline, though:
>
> g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc
> x.cc:4: error: `NonExistent' in namespace `NS' does not name a type
Indeed. That is an improvement. But, it still leaves the impression
that 'NonExistent' may designate something else, contrary to
what its spelling suggests :-)
We can tell the difference by looking at BINDING_VALUE and
BINDING_TYPE of the identifier. Any taker? :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16604