Message ID | 20220107162659.GA948132@adacore.com |
---|---|
State | Committed |
Commit | b2f150304dc18af2f6b11005a140339f170d6fc2 |
Headers | |
Series | [Ada] treepr: print value only for discrete types | |
Commit Message
diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb --- a/gcc/ada/treepr.adb +++ b/gcc/ada/treepr.adb @@ -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