This is the mail archive of the gcc-help@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]

Namespace problem


I am not sure if it is a Microsoft specific extension.

The following code compiles correctly using the latest C/C++ compiler (2005) from Microsoft.

namespace C
{
   enum T
   {
       A,
       B,
       C,
   };
}

int a = C::T::A;

When I compile it using MinGW, gcc produces:

main.cxx:163: error: `C::T' is not a class or namespace
main.cxx:163: error: expected primary-expression before ';' token


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