[Bug c++/31775] static object mangling conflicts with extern object
geoffk at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue May 1 23:54:00 GMT 2007
------- Comment #3 from geoffk at gcc dot gnu dot org 2007-05-02 00:54 -------
You would add a translation unit that says
int i;
or similar. It's not "main::i", it's "::i", because of [basic.link] paragraph
7:
When a block scope declaration of an entity with linkage is not found to refer
to some other declaration,
then that entity is a member of the innermost enclosing namespace.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775
More information about the Gcc-bugs
mailing list