[Bug c++/121966] Problems with candidate numbering in print_z_candidates
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 14 22:18:10 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121966
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by David Malcolm
<dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:e2b6c1ca1c0b9f857c8b5395a26ba22e11c1239d
commit r15-10672-ge2b6c1ca1c0b9f857c8b5395a26ba22e11c1239d
Author: David Malcolm <dmalcolm@redhat.com>
Date: Wed Sep 17 16:39:31 2025 -0400
c++: fix count of z candidates for non-viable candidates, nesting
[PR121966]
In r15-6116-gd3dd24acd74605 I updated print_z_candidates to show the
number of candidates, and a number for each candidate.
PR c++/121966 notes that the printed count is sometimes higher than
what's actually printed: I missed the case where candidates in the
list aren't printed due to not being viable.
Fixed thusly.
gcc/cp/ChangeLog:
PR c++/121966
* call.cc (print_z_candidates): Copy the filtering logic on viable
candidates from the printing loop to the counting loop, so that
num_candidates matches the number of iterations of the latter
loop.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
(cherry picked from commit c0b21d1f45ac6a249974982c1a7f7515efb78747)
More information about the Gcc-bugs
mailing list