aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2024-05-23 17:11:42 -0700
committerMarc Poulhiès <poulhies@adacore.com>2024-06-21 10:34:18 +0200
commit244d02bb288a07f3252fc9ed38675b93a9a91225 (patch)
treeb7a345f17e6c21d5237b27bae4fefa9c56bf0554 /libcpp
parentc5aed359a563c48f616d58f708c398f8494d7731 (diff)
downloadgcc-244d02bb288a07f3252fc9ed38675b93a9a91225.zip
gcc-244d02bb288a07f3252fc9ed38675b93a9a91225.tar.gz
gcc-244d02bb288a07f3252fc9ed38675b93a9a91225.tar.bz2
ada: Predefined arithmetic operators incorrectly treated as directly visible
In some cases, a predefined operator (e.g., the "+" operator for an integer type) is incorrectly treated as being directly visible when it is not. This can lead to both accepting operator uses that should be rejected and also to incorrectly rejecting legal constructs as ambiguous (for example, an expression "Foo + 1" where Foo is an overloaded function and the "+" operator is directly visible for the result type of only one of the possible callees). gcc/ada/ * sem_ch4.adb (Is_Effectively_Visible_Operator): A new function. (Check_Arithmetic_Pair): In paths where Add_One_Interp was previously called unconditionally, instead call only if Is_Effectively_Visible_Operator returns True. (Check_Boolean_Pair): Likewise. (Find_Unary_Types): Likewise.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions