diff options
author | Marek Polacek <polacek@redhat.com> | 2021-03-26 11:20:03 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2021-03-26 16:12:08 -0400 |
commit | c453a817129c2c362726a9773390419f1df7dda3 (patch) | |
tree | 51fd88250e662c19b7c5ef709efeb54450473e7f /gcc/cp/method.c | |
parent | 5f070ba29803c99a5fe94ed7632d7b8c55593df3 (diff) | |
download | gcc-c453a817129c2c362726a9773390419f1df7dda3.zip gcc-c453a817129c2c362726a9773390419f1df7dda3.tar.gz gcc-c453a817129c2c362726a9773390419f1df7dda3.tar.bz2 |
c++: ICE on invalid with NSDMI in C++98 [PR98352]
NSDMIs are a C++11 thing, and here we ICE with them on the non-C++11
path. Fortunately all we need is a small tweak to my recent r11-7835
patch.
gcc/cp/ChangeLog:
PR c++/98352
* method.c (implicitly_declare_fn): Pass &raises to
synthesized_method_walk.
gcc/testsuite/ChangeLog:
PR c++/98352
* g++.dg/cpp0x/inh-ctor37.C: Remove dg-error.
* g++.dg/cpp0x/nsdmi17.C: New test.
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 25c1e68..8ae7496 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -3002,7 +3002,7 @@ implicitly_declare_fn (special_function_kind kind, tree type, member initializer (c++/89914). Also, in C++98, we might have failed to deduce RAISES, so try again but complain this time. */ if (cxx_dialect < cxx11) - synthesized_method_walk (type, kind, const_p, nullptr, nullptr, + synthesized_method_walk (type, kind, const_p, &raises, nullptr, nullptr, nullptr, /*diag=*/true, &inherited_ctor, inherited_parms); /* We should have seen an error at this point. */ |