diff options
author | Jason Merrill <jason@redhat.com> | 2019-11-19 15:22:12 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2019-11-19 15:22:12 -0500 |
commit | 8d5d90878ea9731301d3a1af32a444e4772e65e4 (patch) | |
tree | 97700c240dbdfff23fb6a4a626ad00d32e60b04a /gcc/builtins.c | |
parent | 9a8819b8828490a83eaf9d069a049e26211cc215 (diff) | |
download | gcc-8d5d90878ea9731301d3a1af32a444e4772e65e4.zip gcc-8d5d90878ea9731301d3a1af32a444e4772e65e4.tar.gz gcc-8d5d90878ea9731301d3a1af32a444e4772e65e4.tar.bz2 |
Consider parm types equivalence for operator rewrite tiebreaker.
The C++ committee continues to discuss how best to avoid breaking existing
code with the new rules for reversed operators. A recent suggestion was to
base the tie-breaker on the parameter types of the candidates, which made a
lot of sense to me, so this patch implements that.
This patch also mentions that a candidate was reversed or rewritten when
printing the list of candidates, and warns about a comparison that becomes
recursive under the new rules. There is no flag for this warning; people
can silence it by swapping the operands.
* call.c (same_fn_or_template): Change to cand_parms_match.
(joust): Adjust.
(print_z_candidate): Mark rewritten/reversed candidates.
(build_new_op_1): Warn about recursive call with reversed arguments.
From-SVN: r278465
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions