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++/12291] [3.4 regression?] filename only sometimes in mangled name of anonymous namespace members


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12291



------- Additional Comments From phil dot el at wanadoo dot fr  2003-09-16 18:48 -------
Subject: Re:  [3.4 regression?] filename only sometimes in
 mangled name of anonymous namespace members

[second try, first was blocked by automated, broken by design,
anti spam]

template <class T>
struct bar
{
   bar() {}
};

extern template class bar<int>;

static void f()
{
   bar<int> b;
}

struct foo {
   foo();
};

namespace {
   foo option;
}

this use bar ctor name to mangle option.
00000000 B _ZN25_GLOBAL__N__ZN3barIiEC1Ev6optionE

removing the extern template ... I got:
00000000 B _ZN36_GLOBAL__N_tmp30.i_6AAA976C_991AFCF76optionE

it look like compiler is confused by the extern template
and think the definition of bar() ctor can't be seen
in another translation unit so it's valid to use bar name
to uniquify option mangled name.

regards,
phe


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