This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[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
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 8 Mar 2011 17:06:21 +0000
- Subject: [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
- Auto-submitted: auto-generated
- References: <bug-47488-4@http.gcc.gnu.org/bugzilla/>
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'>());
}