aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-01-20 20:12:52 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-10 08:19:26 +0000
commitd421523a42d50e1004d5bbe30e4c45b2b98f1a03 (patch)
treef64dc658937598483de20636349aa013fd9b5ae9 /gcc/fold-const.cc
parent3a978538036cd43d629c7b003c5ee6c8b3bf2c98 (diff)
downloadgcc-d421523a42d50e1004d5bbe30e4c45b2b98f1a03.zip
gcc-d421523a42d50e1004d5bbe30e4c45b2b98f1a03.tar.gz
gcc-d421523a42d50e1004d5bbe30e4c45b2b98f1a03.tar.bz2
[Ada] Refine iteration from entities to formals
When matching formal parameters from spec and body it is cleaner and more efficient to iterate with First_Formal/Next_Formal and not with First_Entity/Next_Entity. The previous iteration could unintentionally pick entities from within the subprogram body, e.g. objects declared within the subprogram. gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace First_Entity/Next_Entity with First_Formal/Next_Formal; rename E1/E2 to F1/F2.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions