aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2024-01-16 13:07:20 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-07 09:55:57 +0200
commit3e01dfa72623ede64ff2e92f6852d1fd07e8898d (patch)
treed0e2309b26e52f599639b1f262f31a9d085da887 /gcc/ada
parenta1e6fdc0773bd9d7e7a2e2a9135c2c6c982b67af (diff)
downloadgcc-3e01dfa72623ede64ff2e92f6852d1fd07e8898d.zip
gcc-3e01dfa72623ede64ff2e92f6852d1fd07e8898d.tar.gz
gcc-3e01dfa72623ede64ff2e92f6852d1fd07e8898d.tar.bz2
ada: Simplify detection of the enclosing scope
Code cleanup; behaviour is unaffected. gcc/ada/ * sem_attr.adb (Analyze_Access_Attribute): Replace loop with Current_Scope_No_Loops.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/sem_attr.adb5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 6140cc0..e80a144 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -988,10 +988,7 @@ package body Sem_Attr is
-- expanded into a loop. Locate scope of type definition,
-- if any.
- Scop := Current_Scope;
- while Ekind (Scop) = E_Loop loop
- Scop := Scope (Scop);
- end loop;
+ Scop := Current_Scope_No_Loops;
-- OK if we are within the scope of a limited type
-- let's mark the component as having per object constraint