aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sprint.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-12-24 09:36:03 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-02 04:58:20 -0400
commitfa54f4da74b48a088fb1cef7b7f593d02319d019 (patch)
tree46e552494ee55a6bcc714a1aab1df6d8d97d65c9 /gcc/ada/sprint.adb
parent6a987d785122fb015aac527e927818bdc9975a7b (diff)
downloadgcc-fa54f4da74b48a088fb1cef7b7f593d02319d019.zip
gcc-fa54f4da74b48a088fb1cef7b7f593d02319d019.tar.gz
gcc-fa54f4da74b48a088fb1cef7b7f593d02319d019.tar.bz2
[Ada] Remove degenerate Treat_Fixed_As_Integer mechanism
2020-06-02 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch4.adb (Expand_N_Op_Divide): Remove code dealing with the Treat_Fixed_As_Integer flag. (Expand_N_Op_Multiply): Likewise. * exp_fixd.adb (Build_Divide): Do the division in an integer type long enough to hold both operands and convert the result to the type of the LHS. Do not set Treat_Fixed_As_Integer. (Build_Multiply): Do not set Treat_Fixed_As_Integer. (Build_Rem): Likewise. * sem_ch4.adb (Analyze_Arithmetic_Op): Remove code dealing with the Treat_Fixed_As_Integer flag. (Check_Arithmetic_Pair): Likewise. * sinfo.ads (Treat_Fixed_As_Integer): Delete. (N_Has_Treat_Fixed_As_Integer): Likewise. (Set_Treat_Fixed_As_Integer): Likewise. * sinfo.adb (Treat_Fixed_As_Integer): Likewise. (Set_Treat_Fixed_As_Integer): Likewise. * sprint.ads (Syntax Extensions): Remove '#' special character. * sprint.adb (Process_TFAI_RR_Flags): Delete. (Sprint_Node_Actual) <N_Op_Divide>: Print '@' manually. <N_Op_Multiply>: Likewise. <N_Op_Mod>: Do not print '#'. <N_Op_Rem>: Likewise.
Diffstat (limited to 'gcc/ada/sprint.adb')
-rw-r--r--gcc/ada/sprint.adb38
1 files changed, 6 insertions, 32 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 8a8139d..6a02d8f 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -176,11 +176,6 @@ package body Sprint is
-- Used to print output lines in Debug_Generated_Code mode (this is used
-- as the argument for a call to Set_Special_Output in package Output).
- procedure Process_TFAI_RR_Flags (Nod : Node_Id);
- -- Given a divide, multiplication or division node, check the flags
- -- Treat_Fixed_As_Integer and Rounded_Flags, and if set, output the
- -- appropriate special syntax characters (# and @).
-
procedure Set_Debug_Sloc;
-- If Dump_Node is non-empty, this routine sets the appropriate value
-- in its Sloc field, from the current location in the debug source file
@@ -471,21 +466,6 @@ package body Sprint is
Write_Debug_Line (S, Debug_Sloc);
end Print_Debug_Line;
- ---------------------------
- -- Process_TFAI_RR_Flags --
- ---------------------------
-
- procedure Process_TFAI_RR_Flags (Nod : Node_Id) is
- begin
- if Treat_Fixed_As_Integer (Nod) then
- Write_Char ('#');
- end if;
-
- if Rounded_Result (Nod) then
- Write_Char ('@');
- end if;
- end Process_TFAI_RR_Flags;
-
--------
-- ps --
--------
@@ -2508,7 +2488,9 @@ package body Sprint is
when N_Op_Divide =>
Sprint_Left_Opnd (Node);
Write_Char (' ');
- Process_TFAI_RR_Flags (Node);
+ if Rounded_Result (Node) then
+ Write_Char ('@');
+ end if;
Write_Operator (Node, "/ ");
Sprint_Right_Opnd (Node);
@@ -2548,18 +2530,15 @@ package body Sprint is
when N_Op_Mod =>
Sprint_Left_Opnd (Node);
-
- if Treat_Fixed_As_Integer (Node) then
- Write_Str (" #");
- end if;
-
Write_Operator (Node, " mod ");
Sprint_Right_Opnd (Node);
when N_Op_Multiply =>
Sprint_Left_Opnd (Node);
Write_Char (' ');
- Process_TFAI_RR_Flags (Node);
+ if Rounded_Result (Node) then
+ Write_Char ('@');
+ end if;
Write_Operator (Node, "* ");
Sprint_Right_Opnd (Node);
@@ -2583,11 +2562,6 @@ package body Sprint is
when N_Op_Rem =>
Sprint_Left_Opnd (Node);
-
- if Treat_Fixed_As_Integer (Node) then
- Write_Str (" #");
- end if;
-
Write_Operator (Node, " rem ");
Sprint_Right_Opnd (Node);