]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
class.c (finish_struct_1): Don't complain about non-copy assignment ops in union...
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 28 Oct 1998 20:36:04 +0000 (20:36 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 28 Oct 1998 20:36:04 +0000 (15:36 -0500)
* class.c (finish_struct_1): Don't complain about non-copy
assignment ops in union members.
* class.c (build_vtable): Don't pass at_eof to import_export_vtable.
(prepare_fresh_vtable): Likewise.
(finish_struct_1): Don't call import_export_class.
* decl2.c (finish_vtable_vardecl): Do import/export stuff.
(finish_prevtable_vardecl): Lose.
(finish_file): Don't call it.
* pt.c (instantiate_class_template): Likewise.

From-SVN: r23411

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl2.c
gcc/cp/pt.c

index 8b0faa7ad8c51327cade273bcfee2ed8ad80a068..24a746d21e295114c44a25065d50dd415be53394 100644 (file)
@@ -1,3 +1,16 @@
+1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * class.c (finish_struct_1): Don't complain about non-copy
+       assignment ops in union members.
+
+       * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
+       (prepare_fresh_vtable): Likewise.
+       (finish_struct_1): Don't call import_export_class.
+       * decl2.c (finish_vtable_vardecl): Do import/export stuff.
+       (finish_prevtable_vardecl): Lose.
+       (finish_file): Don't call it.
+       * pt.c (instantiate_class_template): Likewise.
+
 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
 
        * parse.y (condition): Convert VAR_DECL from reference to indirect
index 07092c76f10490a219d60cf03a1b8f51e2cdd371..b9874d04a9a1b8a78ad267396f7d416060e207a7 100644 (file)
@@ -704,7 +704,7 @@ build_vtable (binfo, type)
 #endif
 
   /* Set TREE_PUBLIC and TREE_EXTERN as appropriate.  */
-  import_export_vtable (decl, type, at_eof);
+  import_export_vtable (decl, type, 0);
 
   decl = pushdecl_top_level (decl);
   SET_IDENTIFIER_GLOBAL_VALUE (name, decl);
@@ -890,7 +890,7 @@ prepare_fresh_vtable (binfo, for_type)
 #endif
 
   /* Set TREE_PUBLIC and TREE_EXTERN as appropriate.  */
-  import_export_vtable (new_decl, for_type, at_eof);
+  import_export_vtable (new_decl, for_type, 0);
 
   if (TREE_VIA_VIRTUAL (binfo))
     my_friendly_assert (binfo == binfo_member (BINFO_TYPE (binfo),
@@ -3547,8 +3547,8 @@ finish_struct_1 (t, warn_anon)
                    fie = "constructor";
                  else if (TYPE_NEEDS_DESTRUCTOR (type))
                    fie = "destructor";
-                 else if (TYPE_HAS_REAL_ASSIGNMENT (type))
-                   fie = "assignment operator";
+                 else if (TYPE_HAS_COMPLEX_ASSIGN_REF (type))
+                   fie = "copy assignment operator";
                  if (fie)
                    cp_error_at ("member `%#D' with %s not allowed in union", x,
                                 fie);
@@ -3943,11 +3943,6 @@ finish_struct_1 (t, warn_anon)
   if (max_has_virtual > 0)
     TYPE_VIRTUAL_P (t) = 1;
 
-  /* Do this here before we start messing with vtables so that we are ready
-     for import_export_vtable.  */
-  if (at_eof)
-    import_export_class (t);
-
   if (flag_rtti && TYPE_VIRTUAL_P (t) && !pending_hard_virtuals)
     modify_all_vtables (t, NULL_TREE, NULL_TREE);
 
index 2df2ac0d5c114eb7c9727c1d55c1f1f83974aed0..e9a65a059e11538cf4965d53d31ea08c67ed0e69 100644 (file)
@@ -2649,20 +2649,14 @@ import_export_class (ctype)
     }
 }
     
-int
-finish_prevtable_vardecl (prev, vars)
+static int
+finish_vtable_vardecl (prev, vars)
      tree prev, vars;
 {
   tree ctype = DECL_CONTEXT (vars);
   import_export_class (ctype);
   import_export_vtable (vars, ctype, 1);
-  return 1;
-}
-    
-static int
-finish_vtable_vardecl (prev, vars)
-     tree prev, vars;
-{
+
   if (write_virtuals >= 0
       && ! DECL_EXTERNAL (vars)
       && ((TREE_PUBLIC (vars) && ! DECL_WEAK (vars) && ! DECL_ONE_ONLY (vars))
@@ -3217,11 +3211,6 @@ finish_file ()
   pushdecl (vars);
 #endif
 
-  /* Walk to mark the inline functions we need, then output them so
-     that we can pick up any other tdecls that those routines need.  */
-  walk_vtables ((void (*) PROTO ((tree, tree))) 0,
-               finish_prevtable_vardecl);
-
   for (vars = static_aggregates; vars; vars = TREE_CHAIN (vars))
     if (! TREE_ASM_WRITTEN (TREE_VALUE (vars)))
       rest_of_decl_compilation (TREE_VALUE (vars), 0, 1, 1);
index 5c65140cbe7bd35d87a7e42cd910be0535324f74..556b761831a45cfdcfcadd39eb1c84f199468642 100644 (file)
@@ -4078,8 +4078,6 @@ instantiate_class_template (type)
   CLASSTYPE_GOT_SEMICOLON (type) = 1;
 
   repo_template_used (type);
-  if (at_eof && TYPE_BINFO_VTABLE (type) != NULL_TREE)
-    finish_prevtable_vardecl (NULL, TYPE_BINFO_VTABLE (type));
 
  end:
   TYPE_BEING_DEFINED (type) = 0;