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++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c


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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 17:06:20 UTC ---
So, the basic problem is that we still don't know how to mangle string
constants, it just changed from a sorry to an ICE.  There was a mangling
proposed on the ABI list, but while looking at it I realized that it isn't
sufficient--it produces a multiply defined symbol for

template <typename T> constexpr T f(const T* p) { return p[0]; }
template<int> struct N { };
template <typename T> void g(T, N<f((const T*)"1")>) { }
template <typename T> void g(T, N<f((const T*)"2")>) { }

int main()
{
  g('1', N<'1'>());
  g('2', N<'2'>());
}


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