aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-03-24 15:40:44 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-03-24 15:40:44 -0400
commita9f0423f312c2c117185f24dcfd3cba617bc6f8c (patch)
tree51541c8cb9a92011b3792fc990846be363bea52f
parent4b7c558dd0ba4af1796c070a26cdeaf60acbad5e (diff)
downloadgcc-a9f0423f312c2c117185f24dcfd3cba617bc6f8c.zip
gcc-a9f0423f312c2c117185f24dcfd3cba617bc6f8c.tar.gz
gcc-a9f0423f312c2c117185f24dcfd3cba617bc6f8c.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cp-tree.h5
-rw-r--r--gcc/cp/name-lookup.c2
-rw-r--r--gcc/cp/parser.c1
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 <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.
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,