From: Piotr Trojanek Date: Wed, 15 Apr 2020 20:53:54 +0000 (+0200) Subject: [Ada] Warn on slices of the form A (subtype) for all objects X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81c629f8f12765f9b1bf29ecfef7f32f5189723c;p=gcc.git [Ada] Warn on slices of the form A (subtype) for all objects gcc/ada/ * sem_eval.adb (Eval_Slice): Emit warning not just for constants, but for any objects. --- diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index 443926f1e7e..e453bc1676b 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -3961,7 +3961,7 @@ package body Sem_Eval is T : constant Entity_Id := Etype (E); begin - if Ekind (E) = E_Constant + if Is_Object (E) and then Is_Array_Type (T) and then Is_Entity_Name (Drange) then