https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112436
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:ecc119effe1aa445cb973c8cbb5ef3830f256f13 commit r14-8958-gecc119effe1aa445cb973c8cbb5ef3830f256f13 Author: Marek Polacek <pola...@redhat.com> Date: Sat Feb 10 10:52:18 2024 -0500 c++: SFINAE-unfriendly error on throwing pointer [PR112436] On the heels of r14-8903, this patch adds further complain parameters so that we don't emit "invalid use of incomplete type" from inside a concept. PR c++/112436 gcc/cp/ChangeLog: * except.cc (expand_start_catch_block): Pass tf_warning_or_error to is_admissible_throw_operand_or_catch_parameter. (build_throw): Pass complain to is_admissible_throw_operand_or_catch_parameter. (complete_ptr_ref_or_void_ptr_p): Add a tsubst_flags_t parameter. Use it. Return bool. Call complete_type_or_maybe_complain instead of complete_type_or_else. (is_admissible_throw_operand_or_catch_parameter): Add a tsubst_flags_t parameter. Use it. Guard error calls. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-pr112436.C: New test.