re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
authorJason Merrill <jason@redhat.com>
Tue, 24 Mar 2015 19:40:44 +0000 (15:40 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 24 Mar 2015 19:40:44 +0000 (15:40 -0400)
PR c++/65046
* cp-tree.h (NAMESPACE_IS_INLINE): Remove.
* parser.c (cp_parser_namespace_definition): Don't set it.
* name-lookup.c (handle_namespace_attrs): Check
DECL_NAMESPACE_ASSOCIATIONS instead.

From-SVN: r221642

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/name-lookup.c
gcc/cp/parser.c

index 3f948fd..5b3fd49 100644 (file)
@@ -1,5 +1,11 @@
 2015-03-24  Jason Merrill  <jason@redhat.com>
 
+       PR c++/65046
+       * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
+       * parser.c (cp_parser_namespace_definition): Don't set it.
+       * name-lookup.c (handle_namespace_attrs): Check
+       DECL_NAMESPACE_ASSOCIATIONS instead.
+
        PR c++/65498
        * pt.c (get_mostly_instantiated_function_type): Just return the
        type of the partially instantiated template in DECL_TI_TEMPLATE.
index 7111449..48d2aa8 100644 (file)
@@ -152,7 +152,6 @@ c-common.h, not after.
       DECL_MUTABLE_P (in FIELD_DECL)
       DECL_DEPENDENT_P (in USING_DECL)
       LABEL_DECL_BREAK (in LABEL_DECL)
-      NAMESPACE_IS_INLINE (in NAMESPACE_DECL)
    1: C_TYPEDEF_EXPLICITLY_SIGNED (in TYPE_DECL).
       DECL_TEMPLATE_INSTANTIATED (in a VAR_DECL or a FUNCTION_DECL)
       DECL_MEMBER_TEMPLATE_P (in TEMPLATE_DECL)
@@ -2657,10 +2656,6 @@ struct GTY(()) lang_decl {
 #define LOCAL_CLASS_P(NODE)                            \
   (decl_function_context (TYPE_MAIN_DECL (NODE)) != NULL_TREE)
 
-/* 1 iff this NAMESPACE_DECL is an inline namespace.  */
-#define NAMESPACE_IS_INLINE(NODE)                              \
-  DECL_LANG_FLAG_0 (NAMESPACE_DECL_CHECK (NODE))
-
 /* For a NAMESPACE_DECL: the list of using namespace directives
    The PURPOSE is the used namespace, the value is the namespace
    that is the common ancestor.  */
index c845d52..b85fbc9 100644 (file)
@@ -3657,7 +3657,7 @@ handle_namespace_attrs (tree ns, tree attributes)
        }
       else if (is_attribute_p ("abi_tag", name))
        {
-         if (!NAMESPACE_IS_INLINE (ns))
+         if (!DECL_NAMESPACE_ASSOCIATIONS (ns))
            {
              warning (OPT_Wattributes, "ignoring %qD attribute on non-inline "
                       "namespace", name);
index 98d741f..a18f38c 100644 (file)
@@ -16233,7 +16233,6 @@ cp_parser_namespace_definition (cp_parser* parser)
   if (is_inline)
     {
       tree name_space = current_namespace;
-      NAMESPACE_IS_INLINE (name_space) = true;
       /* Set up namespace association.  */
       DECL_NAMESPACE_ASSOCIATIONS (name_space)
        = tree_cons (CP_DECL_CONTEXT (name_space), NULL_TREE,