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

[Bug c++/31775] static object mangling conflicts with extern object



------- 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


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