On 14 October 2014 18:07, Joel Brobecker <brobec...@adacore.com> wrote: >> I've just seen this, so I'll repeat what I've said in gdb patches too. >> >> The call to strtold is only needed to decode templates which have a >> floating point value encoded inside. This value may or may not have a >> greater than double precision. >> >> Replacing long double with double will be fine with me. I'll accept >> that I didn't consider legacy in hindsight, and in reality it would be >> rather rare to stumble upon the need for strtold. > > Attached is a patch that switches it to strtod. Do you have any > test that could quickly verify it? That seems to be the best > approach, at least short-term. Later on, if we do want to use > higher precision, we can indeed add strtold in libiberty. >
See d-demangle-expected in the libiberty testsuite, in particular: _D8demangle17__T4testVde0A8P6Zv demangle.test!(42.0000) _D8demangle16__T4testVdeA8P2Zv demangle.test!(42.0000) _D8demangle18__T4testVdeN0A8P6Zv demangle.test!(-42.0000) _D8demangle31__T4testVde0F6E978D4FDF3B646P7Zv demangle.test!(123.456) I doubt they would need adjusting. Regards Iain