This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
> It will not work. One reason was explained by DJ. Another is that
> it does not reduce to a normal form before outputing leading to many
> symbols being thought different while they are the same.
Note that g++ already does not reduce to normal form.
If it did, we would not have this problem, as all floating point
literals could be eliminated, since g++ does not permit floating point
values as template arguments.
For example, given this input:
template<int v> struct A { static const int i = v; A(int); };
template<int i> void f(A<i+0>, A<0+i>) {}
void g() { f<1>(1, 2); }
The name of f<1> is
void f<1>(A<(1) + (0)>, A<(0) + (1)>)
In other words, g++ does not recognize that A<i+0> and A<0+i> are
arguably the same type, at least in the sense that it is probably
impossible to distinguish between them other than by different
instantiations of static variables.
Is this a bug in g++?
Ian
- References:
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
- Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.