Skip to content
Snippets Groups Projects
Commit ecc119ef authored by Marek Polacek's avatar Marek Polacek
Browse files

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.
parent 4a1cd556
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment