projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
433b2e9
)
[Ada] Warn on slices of the form A (subtype) for all objects
author
Piotr Trojanek
<trojanek@adacore.com>
Wed, 15 Apr 2020 20:53:54 +0000
(22:53 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Thu, 26 Nov 2020 08:39:51 +0000
(
03:39
-0500)
gcc/ada/
* sem_eval.adb (Eval_Slice): Emit warning not just for
constants, but for any objects.
gcc/ada/sem_eval.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_eval.adb
b/gcc/ada/sem_eval.adb
index 443926f1e7ee5e64baaed7fc99c5439a82a09ffb..e453bc1676b8a0f64aba6a12791b3962e7d19588 100644
(file)
--- 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