aboutsummaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2022-01-03 15:29:09 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-09 09:27:33 +0000
commit5081e9205a6f12c41bdd5a7d630a732120fb4e92 (patch)
treeaf78b3e26dc280ed5b4c6993d9b0135b19bc92d1 /missing
parentf1231d9a0baab25e0a07b0d6146b91e59ecfadb8 (diff)
downloadgcc-5081e9205a6f12c41bdd5a7d630a732120fb4e92.zip
gcc-5081e9205a6f12c41bdd5a7d630a732120fb4e92.tar.gz
gcc-5081e9205a6f12c41bdd5a7d630a732120fb4e92.tar.bz2
[Ada] Fix visibility inside declare_expression
The first implementation just created a scope for the analysis of the declarations and the expression, so that visibility would just work as it does for all other constructs. However this led to an annoying bug when one of the declarations or the expression itself creates a transient scope: there may be a confusion on scope exit between those two scopes. As a result visibility is handled by explicit traversal of the expression and replacement of occurrences of the local variables, see Replace_Local_Ref in Resolve_Declare_Expression (sem_res.adb). The current code does not take into account that there may be references to a local object in a subsequent declaration (not just in the expression). gcc/ada/ * sem_res.adb (Resolve_Declare_Expression): Traverse the expression to replace references to local variables that occur within declarations of the declare_expression; fix typos in comments.
Diffstat (limited to 'missing')
0 files changed, 0 insertions, 0 deletions