aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2024-07-30 12:30:08 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-08-23 10:51:03 +0200
commit8719b1843bc0f24a79433c8685d09cf822af0db7 (patch)
tree217d83b61b08fbdb90706f8dd36c13af13a8ff5f /gcc/expr.cc
parent4522f1f6e31a606d1c9784eb5790b51e5e194bc7 (diff)
downloadgcc-8719b1843bc0f24a79433c8685d09cf822af0db7.zip
gcc-8719b1843bc0f24a79433c8685d09cf822af0db7.tar.gz
gcc-8719b1843bc0f24a79433c8685d09cf822af0db7.tar.bz2
ada: Fix validity checks for named parameter associations
When iterating over actual and formal parameters, we should use First_Actual/Next_Actual and not simply First/Next, because the order of actual parameters might be different than the order of formal parameters obtained with First_Formal/Next_Formal. This patch fixes a glitch in validity checks for actual parameters and applies the same fix to other misuses of First/Next as well. gcc/ada/ * checks.adb (Ensure_Valid): Use First_Actual/Next_Actual. * exp_ch6.adb (Is_Direct_Deep_Call): Likewise. * exp_util.adb (Type_Of_Formal): Likewise. * sem_util.adb (Is_Container_Element): Likewise; cleanup membership test by using a subtype.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions