]> gcc.gnu.org Git - gcc.git/commit
Use strtod instead of strtold in libiberty/d-demangle.c
authorJoel Brobecker <brobecker@adacore.com>
Tue, 14 Oct 2014 17:57:08 +0000 (17:57 +0000)
committerJoel Brobecker <brobecke@gcc.gnu.org>
Tue, 14 Oct 2014 17:57:08 +0000 (17:57 +0000)
commit2a523cfe4e6304f18117266d34f4ae2603274577
treefa07e611157bd534c668860de85bd30c4a8b2096
parent957079189766793e0f6f82dfe74edc477f619bc2
Use strtod instead of strtold in libiberty/d-demangle.c

strtold is currently used to decode templates which have a floating-point
value encoded inside; but this routine is not available on some systems,
such as Solaris 2.9 for instance.

This patch fixes the issue by replace the use of strtold by strtod.
It reduces a bit the precision, but it should still remain acceptable
in most cases.

libiberty/ChangeLog:

        * d-demangle.c: Replace strtold with strtod in global comment.
        (strtold): Remove declaration.
        (strtod): New declaration.
        (dlang_parse_real): Declare value as double instead of long
        double.  Replace call to strtold by call to strtod.
        Update format in call to snprintf.

From-SVN: r216216
libiberty/ChangeLog
libiberty/d-demangle.c
This page took 0.059342 seconds and 5 git commands to generate.