decl.c (duplicate_decls): Make the newdecl virtual if the olddecl was...
authorMark Mitchell <mmitchell@usa.net>
Thu, 18 Dec 1997 16:45:28 +0000 (16:45 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 18 Dec 1997 16:45:28 +0000 (11:45 -0500)
* decl.c (duplicate_decls): Make the newdecl virtual if the
olddecl was, just as is done with other attributes of olddecl.

From-SVN: r17135

gcc/cp/ChangeLog
gcc/cp/decl.c

index ca47cfdbb9e312d42c3bd4250769bba3b16b9f3c..18e77ea58cbeb4da2bb200f5eed247a62a6a71bb 100644 (file)
@@ -1,3 +1,8 @@
+Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
+
+       * decl.c (duplicate_decls): Make the newdecl virtual if the
+       olddecl was, just as is done with other attributes of olddecl.
+
 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * typeck.c (unary_complex_lvalue): Ignore op0 when taking the 
index c38445f64c773e4a20fecb69570bf8f1bf709cd9..2f9f988645c04c426ab49adaea74ad396bd58700 100644 (file)
@@ -2692,6 +2692,7 @@ duplicate_decls (newdecl, olddecl)
       DECL_STATIC_CONSTRUCTOR (newdecl) |= DECL_STATIC_CONSTRUCTOR (olddecl);
       DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl);
       DECL_ABSTRACT_VIRTUAL_P (newdecl) |= DECL_ABSTRACT_VIRTUAL_P (olddecl);
+      DECL_VIRTUAL_P (newdecl) |= DECL_VIRTUAL_P (olddecl);
     }
 
   /* Deal with C++: must preserve virtual function table size.  */