summaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 0137c3f4a33..d900560490e 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -945,7 +945,6 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
set_underlying_type (x);
if (type != error_mark_node
- && TYPE_NAME (type)
&& TYPE_IDENTIFIER (type))
set_identifier_type_value (DECL_NAME (x), x);
@@ -3333,7 +3332,7 @@ do_class_using_decl (tree scope, tree name)
}
/* Using T::T declares inheriting ctors, even if T is a typedef. */
if (MAYBE_CLASS_TYPE_P (scope)
- && ((TYPE_NAME (scope) && name == TYPE_IDENTIFIER (scope))
+ && (name == TYPE_IDENTIFIER (scope)
|| constructor_name_p (name, scope)))
{
maybe_warn_cpp0x (CPP0X_INHERITING_CTORS);
@@ -4019,13 +4018,14 @@ do_using_directive (tree name_space)
void
parse_using_directive (tree name_space, tree attribs)
{
- tree a;
-
do_using_directive (name_space);
- for (a = attribs; a; a = TREE_CHAIN (a))
+ if (attribs == error_mark_node)
+ return;
+
+ for (tree a = attribs; a; a = TREE_CHAIN (a))
{
- tree name = TREE_PURPOSE (a);
+ tree name = get_attribute_name (a);
if (is_attribute_p ("strong", name))
{
if (!toplevel_bindings_p ())