This moves the low-level processing on characters to the package
Img_Util, factors out common processing with fixed point, and overhauls
the handling of negative zeros and rounding.  This also removes the
Is_Negative intrinsic function, which was only accessible from
predefined units and is now unused.

No functional changes.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * exp_intr.adb: Remove with/use clauses for Urealp.
        (Expand_Is_Negative): Delete.
        (Expand_Intrinsic_Call): Do not call it.
        * rtsfind.ads (RE_Id): Remove RE_Float_Unsigned.
        (RE_Unit_Table): Remove entry for RE_Float_Unsigned.
        * snames.ads-tmpl (Name_Is_Negative): Delete.
        * libgnat/s-imgrea.ads (Set_Image_Real): Fix mode of S parameter.
        * libgnat/s-imgrea.adb: Add with/use clauses for System.Img_Util.
        (LLU): New subtype.
        (Maxdigs): Use it.
        (Is_Negative): Reimplement.
        (Image_Floating_Point): Simplify.
        (Set_Image_Real): Fix mode of S parameter.  Remove the low-level
        processing on characters.  Flip the sign of the Scale variable.
        Compute the maximum number of digits for the straight notation.
        Call Set_Decimal_Digits at the end to do the final formatting.
        * libgnat/s-imguti.ads (Floating_Invalid_Value): New type.
        (Set_Floating_Invalid_Value): New procedure.
        * libgnat/s-imguti.adb (Set_Floating_Invalid_Value): Implement it
        based on existing code from Set_Image_Real.
        * libgnat/s-unstyp.ads (Float_Unsigned): Delete.

Attachment: patch.diff.gz
Description: application/gzip

Reply via email to