Commit cc3bae3d by Marek Polacek Committed by Marek Polacek

except.c (build_noexcept_spec): Use build_converted_constant_bool_expr instead…

except.c (build_noexcept_spec): Use build_converted_constant_bool_expr instead of perform_implicit_conversion_flags.

	* except.c (build_noexcept_spec): Use build_converted_constant_bool_expr
	instead of perform_implicit_conversion_flags.

	* g++.dg/cpp0x/noexcept30.C: Tweak dg-error.
	* g++.dg/cpp0x/pr86397-1.C: Likewise.
	* g++.dg/cpp0x/pr86397-2.C: Likewise.

From-SVN: r270319
parent 01c9d999
2019-04-12 Marek Polacek <polacek@redhat.com>
* except.c (build_noexcept_spec): Use build_converted_constant_bool_expr
instead of perform_implicit_conversion_flags.
2019-04-11 Jakub Jelinek <jakub@redhat.com>
PR translation/90035
......
......@@ -1285,9 +1285,7 @@ build_noexcept_spec (tree expr, tsubst_flags_t complain)
if (TREE_CODE (expr) != DEFERRED_NOEXCEPT
&& !value_dependent_expression_p (expr))
{
expr = perform_implicit_conversion_flags (boolean_type_node, expr,
complain,
LOOKUP_NORMAL);
expr = build_converted_constant_bool_expr (expr, complain);
expr = instantiate_non_dependent_expr (expr);
expr = cxx_constant_value (expr);
}
......
2019-04-12 Marek Polacek <polacek@redhat.com>
* g++.dg/cpp0x/noexcept30.C: Tweak dg-error.
* g++.dg/cpp0x/pr86397-1.C: Likewise.
* g++.dg/cpp0x/pr86397-2.C: Likewise.
2019-04-12 Matthew Malcomson <matthew.malcomson@arm.com>
* g++.target/arm/arm.exp: Change format of default prune regex.
......
......@@ -5,7 +5,7 @@
template<typename A>
struct F {
template<typename B>
void f() noexcept(&F::template f<B>) {} // { dg-error "exception specification" }
void f() noexcept(&F::template f<B>) {} // { dg-error "exception specification|convert" }
};
int main () {
......
// { dg-do compile { target c++11 } }
// { dg-options "-fdelete-null-pointer-checks" }
void e();
template <bool> void f(int() noexcept(e)) {}
template void f<false>(int()); // { dg-error "does not match" "" { target c++17 } }
template <bool> void f(int() noexcept(e)) {} // { dg-error "convert" }
template void f<false>(int());
// { dg-do compile { target c++11 } }
// { dg-options "-fdelete-null-pointer-checks" }
void e();
template <bool> void f(int() noexcept(e)) {}
template void f<false>(int() noexcept);
template <bool> void f(int() noexcept(e)) {} // { dg-error "convert" }
template void f<false>(int() noexcept); // { dg-error "does not match any template declaration" "" { target c++17 } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment