diff mbox

[c++] delete "com_interface" attribute

Message ID 56872890.7000101@codesourcery.com
State New
Headers show

Commit Message

Sandra Loosemore Jan. 2, 2016, 1:32 a.m. UTC
PR 1078 (yes, that is a very old issue) notes that there is no 
documentation for the C++ "com_interface" attribute.  In fact, this 
attribute has done nothing but issue a warning saying it is obsolete for 
almost 15 years (r42465, to be exact).  It is hard to imagine that 
anyone is using it any more, so I think we should just delete it 
entirely instead of documenting it.  OK to commit?

-Sandra

Comments

Jason Merrill Feb. 2, 2016, 6:36 p.m. UTC | #1
OK.

Jason
diff mbox

Patch

Index: gcc/cp/tree.c
===================================================================
--- gcc/cp/tree.c	(revision 232029)
+++ gcc/cp/tree.c	(working copy)
@@ -43,7 +43,6 @@  static tree verify_stmt_tree_r (tree *, 
 static tree build_local_temp (tree);
 
 static tree handle_java_interface_attribute (tree *, tree, tree, int, bool *);
-static tree handle_com_interface_attribute (tree *, tree, tree, int, bool *);
 static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *);
 static tree handle_abi_tag_attribute (tree *, tree, tree, int, bool *);
 
@@ -3480,8 +3479,6 @@  const struct attribute_spec cxx_attribut
        affects_type_identity } */
   { "java_interface", 0, 0, false, false, false,
     handle_java_interface_attribute, false },
-  { "com_interface",  0, 0, false, false, false,
-    handle_com_interface_attribute, false },
   { "init_priority",  1, 1, true,  false, false,
     handle_init_priority_attribute, false },
   { "abi_tag", 1, -1, false, false, false,
@@ -3514,35 +3511,6 @@  handle_java_interface_attribute (tree* n
   return NULL_TREE;
 }
 
-/* Handle a "com_interface" attribute; arguments as in
-   struct attribute_spec.handler.  */
-static tree
-handle_com_interface_attribute (tree* node,
-				tree name,
-				tree /*args*/,
-				int /*flags*/,
-				bool* no_add_attrs)
-{
-  static int warned;
-
-  *no_add_attrs = true;
-
-  if (DECL_P (*node)
-      || !CLASS_TYPE_P (*node)
-      || *node != TYPE_MAIN_VARIANT (*node))
-    {
-      warning (OPT_Wattributes, "%qE attribute can only be applied "
-	       "to class definitions", name);
-      return NULL_TREE;
-    }
-
-  if (!warned++)
-    warning (0, "%qE is obsolete; g++ vtables are now COM-compatible by default",
-	     name);
-
-  return NULL_TREE;
-}
-
 /* Handle an "init_priority" attribute; arguments as in
    struct attribute_spec.handler.  */
 static tree