Skip to content
Snippets Groups Projects
Commit e58484a0 authored by Patrick Palka's avatar Patrick Palka
Browse files

c++: make -Wctad-maybe-unsupported respect complain [PR105143]

We were attempting to issue a -Wctad-maybe-unsupported warning even when
complain=tf_none, which led to a crash in the first testcase below and a
bogus error during overload resolution in the second testcase.

	PR c++/105143

gcc/cp/ChangeLog:

	* pt.cc (do_class_deduction): Check complain before attempting
	to issue a -Wctad-maybe-unsupported warning.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/nodiscard1.C: New test.
	* g++.dg/warn/Wctad-maybe-unsupported4.C: New test.
parent 6283d5ad
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