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]

namespace lookup bug



I've been led to be believe that having two namespaces with the same
name, nested at different points in namespace tree should work, but I
can't seem to get it to compile.

GCC version:  2.95

System type:  i686-pc-linux-gnu (Redhat 6.0)

All options you passed to the compiler:  g++ -c ClassB.cc -o ClassB

Preprocessed output of the source file that caused the compiler error:

extern "Java"
{
  namespace A
  {
    namespace B
      {
        class ClassA;
      };
  };
  namespace C
  {
    namespace A
    {
      class ClassB;
    };
  };
};

class A::B::ClassA
{
};

class C::A::ClassB : public A::B::ClassA
{
};

Compiler output:

ClassB.cc:23: `B' is not a class or namespace
ClassB.cc:24: `ClassA' is not a class or namespace
ClassB.cc:24: confused by earlier errors, bailing out

Thanks,
Paul


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