This is the mail archive of the
mailing list for the GCC project.
Re: maybe GCC C++ bug in namespace handling?
- From: Jack Lloyd <lloyd at acm dot jhu dot edu>
- To: Dirk Mueller <dmuell at gmx dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 11 Feb 2002 16:50:31 -0500 (EST)
- Subject: Re: maybe GCC C++ bug in namespace handling?
- Organization: JHU ACM/CS/CIRL
On Mon, 11 Feb 2002, Dirk Mueller wrote:
> I've found an incompatibility in the namespace handling between gcc and
> non-gcc compilers, and I am not sure which one is right..
> Given this sample snippet:
> and the line with the comment. which of the statements is correct ?
> gcc groks both without a warning or an error, while other compilers only
> accept the second variant.
> I'm undecided about the correct behaviour. Can anyone please shed a light on
> this ?
GCC seems to be pretty lenient about namespace rules, at least for now. The
pragmatist in me says that if it works with GCC and non-GCC compilers, the
second version is probably the correct one, or at least, the maximally
useful one. Also, it makes more sense, since you initially derive the class
from ns::base, not just base.