Declaration not in namespace surrounding '::'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

maybe this has been asked before, but should this be considered ill-formed?

int a;
namespace B
{
	extern int ::a;
}

$ g++ -c test.cpp
test.cpp:4: error: declaration of 'a' not in a namespace surrounding '::'
$ g++ --version
g++ (GCC) 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)

Thanks!

--
Roger Ferrer Ibáñez - roger.ferrer@xxxxxx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux