diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-03-07 23:08:58 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-03-07 23:08:58 +0000 |
commit | f03e8526def1a820f811a649bc245dde18f18c02 (patch) | |
tree | aaf0a4b38dc9b8dcd379d14f41c5e41463acdb11 /gcc/cp/class.c | |
parent | 5fa09df40239511f4d688af53999322106e8934b (diff) | |
download | gcc-f03e8526def1a820f811a649bc245dde18f18c02.zip gcc-f03e8526def1a820f811a649bc245dde18f18c02.tar.gz gcc-f03e8526def1a820f811a649bc245dde18f18c02.tar.bz2 |
class.c (finish_struct_1): Do not warn about non-virtual destructors in Java classes.
* class.c (finish_struct_1): Do not warn about non-virtual
destructors in Java classes.
* g++.dg/warn/Wnvdtor.C: New test.
From-SVN: r96054
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index ba89ea1..89346d6 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5029,7 +5029,9 @@ finish_struct_1 (tree t) /* Build the VTT for T. */ build_vtt (t); - if (warn_nonvdtor && TYPE_POLYMORPHIC_P (t)) + /* This warning does not make sense for Java classes, since they + cannot have destructors. */ + if (!TYPE_FOR_JAVA (t) && warn_nonvdtor && TYPE_POLYMORPHIC_P (t)) { tree dtor; |