diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-04-15 22:53:54 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-11-26 03:39:51 -0500 |
commit | 81c629f8f12765f9b1bf29ecfef7f32f5189723c (patch) | |
tree | f7776e4f857eef6c97b57ccdc2c04e26082cacc1 /gcc | |
parent | 433b2e91f9ea5ebc1513abd9a749dbde832a7634 (diff) | |
download | gcc-81c629f8f12765f9b1bf29ecfef7f32f5189723c.zip gcc-81c629f8f12765f9b1bf29ecfef7f32f5189723c.tar.gz gcc-81c629f8f12765f9b1bf29ecfef7f32f5189723c.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_eval.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index 443926f..e453bc1 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 |