This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Declaration not in namespace surrounding '::'
- From: Roger Ferrer Ibáñez <roger dot ferrer at bsc dot es>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 05 Jul 2006 10:37:05 +0200
- Subject: 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