https://gcc.gnu.org/g:b81b21e6e47c240edf1b7d641ab40335c2479957
commit r16-7587-gb81b21e6e47c240edf1b7d641ab40335c2479957 Author: Jakub Jelinek <[email protected]> Date: Thu Feb 19 12:32:24 2026 +0100 c++: Clarify convert_nontype_argument return value in function comment If tf_error is not set in COMPLAIN, whether NULL_TREE or error_mark_node is returned doesn't matter. 2026-02-19 Jakub Jelinek <[email protected]> * pt.cc (convert_nontype_argument): Clarify return value in function comment. Diff: --- gcc/cp/pt.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index c17870039ed2..5d988ac52004 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -7576,10 +7576,11 @@ tparm_object_argument (tree var) indicated TYPE. If the conversion is successful, return the converted value. If the conversion is unsuccessful, return NULL_TREE if we issued an error message, or error_mark_node if we - did not. We issue error messages for out-and-out bad template - parameters, but not simply because the conversion failed, since we - might be just trying to do argument deduction. Both TYPE and EXPR - must be non-dependent. + did not. If tf_error is not set in COMPLAIN, whether NULL_TREE + or error_mark_node is returned doesn't matter. We issue error + messages for out-and-out bad template parameters, but not simply + because the conversion failed, since we might be just trying to + do argument deduction. Both TYPE and EXPR must be non-dependent. The conversion follows the special rules described in [temp.arg.nontype], and it is much more strict than an implicit
