diff options
author | Jason Merrill <jason@redhat.com> | 2010-02-10 16:48:35 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-02-10 16:48:35 -0500 |
commit | f1c3cf3c931a57f565ea7d4fe117875bc8701cd9 (patch) | |
tree | 1a4635e30a19420754667446c235f2ef0f178b88 /gcc/cp | |
parent | 7a79ff3be3d08ef53b5b6ca9a0adb7fc84ebdb19 (diff) | |
download | gcc-f1c3cf3c931a57f565ea7d4fe117875bc8701cd9.zip gcc-f1c3cf3c931a57f565ea7d4fe117875bc8701cd9.tar.gz gcc-f1c3cf3c931a57f565ea7d4fe117875bc8701cd9.tar.bz2 |
PR c++/42983, core issue 906
PR c++/42983, core issue 906
* method.c (defaultable_fn_check): Check virtualness.
* include/std/thread (~_Impl_base): Move default out of line.
* libsupc++/nested_exception.h (~nested_exception): Likewise.
From-SVN: r156672
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/method.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fd637fb..11ec213 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2010-02-10 Jason Merrill <jason@redhat.com> + PR c++/42983, core issue 906 + * method.c (defaultable_fn_check): Check virtualness. + +2010-02-10 Jason Merrill <jason@redhat.com> + PR c++/43016 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index cda7ed3..ccc977d 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1069,6 +1069,9 @@ defaultable_fn_check (tree fn) if (TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn))) error ("function %q+D defaulted on its first declaration " "must not have an exception-specification", fn); + if (DECL_VIRTUAL_P (fn)) + error ("%qD declared virtual cannot be defaulted in the class " + "body", fn); } else if (!processing_template_decl) defaulted_late_check (fn); |