This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug c++/16604] 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? :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]