From a9f0423f312c2c117185f24dcfd3cba617bc6f8c Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 24 Mar 2015 15:40:44 -0400 Subject: [PATCH] re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types) 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 | 6 ++++++ gcc/cp/cp-tree.h | 5 ----- gcc/cp/name-lookup.c | 2 +- gcc/cp/parser.c | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3f948fd..5b3fd49 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2015-03-24 Jason Merrill + 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. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 7111449..48d2aa8 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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. */ diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index c845d52..b85fbc9 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -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); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 98d741f..a18f38c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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, -- 2.7.4