diff options
author | Steve Baird <baird@adacore.com> | 2024-05-16 14:49:17 -0700 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-06-20 10:50:58 +0200 |
commit | 301927d93356871f606ff3db2549bb5d44e74516 (patch) | |
tree | 5a33f73d57e658b28ac5b7ac18a1c5a6925a736c /config.sub | |
parent | 4c98b695fd8ee8246d84ba954dd59ddb87ac16d7 (diff) | |
download | gcc-301927d93356871f606ff3db2549bb5d44e74516.zip gcc-301927d93356871f606ff3db2549bb5d44e74516.tar.gz gcc-301927d93356871f606ff3db2549bb5d44e74516.tar.bz2 |
ada: Reference to nonexistent operator in reduction expression accepted
In some cases, a reduction expression that references the (nonexistent)
"+" operator of a generic formal private type is incorrectly accepted.
gcc/ada/
* sem_attr.adb (Resolve_Attribute.Proper_Op): When resolving the
name of the reducer subprogram in a reduction expression,
Proper_Op treats references to operators defined in Standard
specially. Disable this special treatment if the type of the
reduction expression is not the right class of type for the
operator, or if a new Boolean parameter (named "Strict") is True.
(Resolve_Attribute): In the overloaded case, iterate over the
reducer subprogram candidates twice. First with Strict => True and
then, if no good intepretation is found, with Strict => False.
Diffstat (limited to 'config.sub')
0 files changed, 0 insertions, 0 deletions