diff options
author | Marek Polacek <polacek@redhat.com> | 2019-04-12 15:26:16 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2019-04-12 15:26:16 +0000 |
commit | cc3bae3dc2819726e3d3903937e65f4f8d4f2fd5 (patch) | |
tree | 864969e72ddc518f28a9e2169f30fb7e76c7d348 | |
parent | 01c9d999492e603b514485d4344cd2969dacdcda (diff) | |
download | gcc-cc3bae3dc2819726e3d3903937e65f4f8d4f2fd5.zip gcc-cc3bae3dc2819726e3d3903937e65f4f8d4f2fd5.tar.gz gcc-cc3bae3dc2819726e3d3903937e65f4f8d4f2fd5.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/except.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/noexcept30.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/pr86397-1.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/pr86397-2.C | 4 |
6 files changed, 17 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1c0f744..9a12622 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 40e973f..25ab869 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -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); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eba43e5..f20f45d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept30.C b/gcc/testsuite/g++.dg/cpp0x/noexcept30.C index 8c7ff2a..6a9f782 100644 --- a/gcc/testsuite/g++.dg/cpp0x/noexcept30.C +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept30.C @@ -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 () { diff --git a/gcc/testsuite/g++.dg/cpp0x/pr86397-1.C b/gcc/testsuite/g++.dg/cpp0x/pr86397-1.C index a0123cb..c6cfc1b 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr86397-1.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr86397-1.C @@ -1,5 +1,5 @@ // { 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()); diff --git a/gcc/testsuite/g++.dg/cpp0x/pr86397-2.C b/gcc/testsuite/g++.dg/cpp0x/pr86397-2.C index 8e4956b..54aefdb 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr86397-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr86397-2.C @@ -1,5 +1,5 @@ // { 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 } } |