]> gcc.gnu.org Git - gcc.git/commitdiff
[Ada] treepr: print value only for discrete types
authorBob Duff <duff@adacore.com>
Sat, 11 Dec 2021 12:45:54 +0000 (07:45 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 7 Jan 2022 16:24:06 +0000 (16:24 +0000)
gcc/ada/

* treepr.adb (Print_Node_Ref): Change "not Is_Array_Type" to
"Is_Discrete_Type".

gcc/ada/treepr.adb

index ad2bbf07df8dc7fd27f6a9df2cd1b823649e12b4..4980713a60cd106851f7a154978ebbb0270b2088 100644 (file)
@@ -1643,13 +1643,13 @@ package body Treepr is
             end if;
          end if;
 
-         --  If this is an integer-like expression whose value is known, print
-         --  that value.
+         --  If this is a discrete expression whose value is known, print that
+         --  value.
 
          if Nkind (N) in N_Subexpr
            and then Compile_Time_Known_Value (N)
            and then Present (Etype (N))
-           and then not Is_Array_Type (Etype (N))
+           and then Is_Discrete_Type (Etype (N))
          then
             if Is_Entity_Name (N) -- e.g. enumeration literal
               or else Nkind (N) in N_Integer_Literal
This page took 0.058706 seconds and 5 git commands to generate.