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]

Declaration not in namespace surrounding '::'


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@bsc.es


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