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

c++: some missing-SFINAE fixes

It looks like we aren't respecting SFINAE for:

  * an invalid/non-constant conditional explicit-specifier
  * a non-constant conditional noexcept-specifier
  * a non-constant argument to __integer_pack

This patch fixes these in the usual way, by passing complain and
propagating error_mark_node appropriately.

gcc/cp/ChangeLog:

	* decl.cc (build_explicit_specifier): Pass complain to
	cxx_constant_value.
	* except.cc (build_noexcept_spec): Likewise.
	* pt.cc (expand_integer_pack): Likewise.
	(tsubst_function_decl): Propagate error_mark_node returned
	from build_explicit_specifier.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1z/noexcept-type26.C: New test.
	* g++.dg/cpp2a/explicit19.C: New test.
	* g++.dg/ext/integer-pack6.C: New test.
parent 48e40d0b
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