Commit f03e8526 by Mark Mitchell Committed by Mark Mitchell

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
parent 5fa09df4
2005-03-07 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_1): Do not warn about non-virtual
destructors in Java classes.
2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/19311
......
......@@ -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;
......
2005-03-07 Mark Mitchell <mark@codesourcery.com>
* g++.dg/warn/Wnvdtor.C: New test.
2005-03-07 Richard Sandiford <rsandifo@redhat.com>
* gcc.dg/torture/pr19683-1.c: New test.
......
// { dg-options "-Wnon-virtual-dtor" }
extern "Java"
{
class Foo
{
public:
virtual void bar( void);
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment