]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix invalid JSON real numbers generated with -gnatRj
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 26 Mar 2021 09:53:57 +0000 (10:53 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 21 Jun 2021 10:45:05 +0000 (06:45 -0400)
commit08c9ef089fdbe19e648016db7cb4c9fdd665bccc
treed90f183fa107a0f6942f4b86f9061cc2a09f3248
parent05447313c9acb24e0fad6305ad333077707de9ba
[Ada] Fix invalid JSON real numbers generated with -gnatRj

gcc/ada/

* urealp.ads (UR_Write_To_JSON): Declare.
* urealp.adb (Decimal_Exponent_Hi): Treat numbers in base 10
specially and rewrite handling of numbers in other bases.
(Decimal_Exponent_Lo): Likewise.
(Normalize): Minor tweak.
(UR_Write_To_JSON): New wrapper procedure around UR_Write.
* repinfo.adb (List_Type_Info): When the output is to JSON, call
UR_Write_To_JSON instead of UR_Write.
gcc/ada/repinfo.adb
gcc/ada/urealp.adb
gcc/ada/urealp.ads