This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR libstdc++/13045 / C++ demangler, floating values and function pointer type return type postfix fix.
Paul Koning <email@example.com> writes:
> I don't understand this -- code is built for a particular target.
> Why can't the demangler interpret floating point stuff according to
> what --target is set to?
The demangler has not historically been a target-dependent tool. Such
a change would lead to things like renaming c++filt to TARGET-c++filt.
This would also pose difficulties for the demangler code in libiberty,
since libiberty is not built for a particular target in any case--it
is only built for a particular host. The demangler code in libiberty
is in turn used for gdb and the linker. So what you are proposing is
not a minor change.
Also, note that this is solely for the purpose of correctly demangling
floating point constants in expressions used in template
instantiations. Since g++ does not permit floating point constants to
be used directly in template instantiations, it's actually not that
easy to even write a test case for this. (See PR 8861 for more info).