]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Give missing error on ambiguous operand of equality operator
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 24 May 2022 18:38:01 +0000 (20:38 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 4 Jul 2022 07:45:53 +0000 (07:45 +0000)
commit4030e83c276c63700b62c3cebd49097f83cf6288
treeb3946c2a4282b9631fd36c66d6aec03dcb8b6886
parenta8a1da109efe9b12183353faa87b113f6992898f
[Ada] Give missing error on ambiguous operand of equality operator

When the code responsible for giving errors on ambiguous operands of
comparison and equality operators was moved from the 1st phase (analysis)
to the 2nd phase (resolution) of semantic processing, it was incorrectly
restricted to the operator case, which was valid during the 1st phase but
is not during the 2nd phase.

gcc/ada/

* sem_res.adb (Resolve_Comparison_Op): Deal with ambiguous operands
in all cases.
(Resolve_Equality_Op): Likewise, except for the case of the implicit
inequality operator created for a user-defined operator that is not
an intrinsic subprogram.
gcc/ada/sem_res.adb