OSDN Git Service

PR c++/26114, c++/26115
[pf3gnuchains/gcc-fork.git] / gcc / cp / class.c
index fd50f17..0edade8 100644 (file)
@@ -741,7 +741,7 @@ get_vtable_decl (tree type, int complete)
   if (complete)
     {
       DECL_EXTERNAL (decl) = 1;
-      cp_finish_decl (decl, NULL_TREE, NULL_TREE, 0);
+      finish_decl (decl, NULL_TREE, NULL_TREE);
     }
 
   return decl;
@@ -2349,7 +2349,7 @@ check_for_override (tree decl, tree ctype)
 /* Warn about hidden virtual functions that are not overridden in t.
    We know that constructors and destructors don't apply.  */
 
-void
+static void
 warn_hidden (tree t)
 {
   VEC(tree,gc) *method_vec = CLASSTYPE_METHOD_VEC (t);
@@ -2937,7 +2937,7 @@ check_field_decls (tree t, tree *access_decls,
 
          if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t)
              && extra_warnings)
-           warning (0, "non-static reference %q+#D in class without a constructor", x);
+           warning (OPT_Wextra, "non-static reference %q+#D in class without a constructor", x);
        }
 
       type = strip_array_types (type);
@@ -2984,7 +2984,7 @@ check_field_decls (tree t, tree *access_decls,
 
          if (! TYPE_HAS_CONSTRUCTOR (t) && CLASSTYPE_NON_AGGREGATE (t)
              && extra_warnings)
-           warning (0, "non-static const member %q+#D in class without a constructor", x);
+           warning (OPT_Wextra, "non-static const member %q+#D in class without a constructor", x);
        }
       /* A field that is pseudo-const makes the structure likewise.  */
       else if (CLASS_TYPE_P (type))
@@ -3032,7 +3032,7 @@ check_field_decls (tree t, tree *access_decls,
        && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
        && !(TYPE_HAS_INIT_REF (t) && TYPE_HAS_ASSIGN_REF (t)))
     {
-      warning (0, "%q#T has pointer data members", t);
+      warning (OPT_Weffc__, "%q#T has pointer data members", t);
 
       if (! TYPE_HAS_INIT_REF (t))
        {
@@ -4469,7 +4469,7 @@ warn_about_ambiguous_bases (tree t)
        basetype = BINFO_TYPE (binfo);
 
        if (!lookup_base (t, basetype, ba_unique | ba_quiet, NULL))
-         warning (0, "virtual base %qT inaccessible in %qT due to ambiguity",
+         warning (OPT_Wextra, "virtual base %qT inaccessible in %qT due to ambiguity",
                   basetype, t);
       }
 }
@@ -6516,7 +6516,7 @@ dump_class_hierarchy_1 (FILE *stream, int flags, tree t)
 
 /* Debug interface to hierarchy dumping.  */
 
-extern void
+void
 debug_class (tree t)
 {
   dump_class_hierarchy_1 (stderr, TDF_SLIM, t);
@@ -6646,7 +6646,7 @@ dump_thunk (FILE *stream, int indent, tree thunk)
 
 /* Dump the thunks for FN.  */
 
-extern void
+void
 debug_thunks (tree fn)
 {
   dump_thunk (stderr, 0, fn);