diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/init.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8125299..6ffebf1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-01 Jonathan Wakely <jwakely.gcc@gmail.com> + + PR c++/49605 + * init.c (build_delete): Only warn for sfk_deleting_destructor. + 2011-07-01 Jakub Jelinek <jakub@redhat.com> * Make-lang.in (cp/decl.o): Depend on pointer-set.h. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index f80c475..7970b9a 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -3467,8 +3467,9 @@ build_delete (tree type, tree addr, special_function_kind auto_delete, } complete_p = false; } - else if (warn_delnonvdtor && MAYBE_CLASS_TYPE_P (type) - && !CLASSTYPE_FINAL (type) && TYPE_POLYMORPHIC_P (type)) + else if (auto_delete == sfk_deleting_destructor && warn_delnonvdtor + && MAYBE_CLASS_TYPE_P (type) && !CLASSTYPE_FINAL (type) + && TYPE_POLYMORPHIC_P (type)) { tree dtor; dtor = CLASSTYPE_DESTRUCTORS (type); |