aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.0/gcc/cp/decl.c')
-rw-r--r--gcc-4.4.0/gcc/cp/decl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc-4.4.0/gcc/cp/decl.c b/gcc-4.4.0/gcc/cp/decl.c
index dc67a9aa9..2c4b9eb11 100644
--- a/gcc-4.4.0/gcc/cp/decl.c
+++ b/gcc-4.4.0/gcc/cp/decl.c
@@ -7632,7 +7632,6 @@ grokdeclarator (const cp_declarator *declarator,
bool unsigned_p, signed_p, short_p, long_p, thread_p;
bool type_was_error_mark_node = false;
bool parameter_pack_p = declarator? declarator->parameter_pack_p : false;
- bool set_no_warning = false;
bool template_type_arg = false;
signed_p = declspecs->specs[(int)ds_signed];
@@ -8311,7 +8310,6 @@ grokdeclarator (const cp_declarator *declarator,
/* We now know that the TYPE_QUALS don't apply to the
decl, but to its return type. */
type_quals = TYPE_UNQUALIFIED;
- set_no_warning = true;
}
/* Error about some types functions can't return. */
@@ -8855,8 +8853,13 @@ grokdeclarator (const cp_declarator *declarator,
/* Replace the anonymous name with the real name everywhere. */
for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t))
- if (TYPE_NAME (t) == oldname)
- TYPE_NAME (t) = decl;
+ {
+ if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
+ {
+ debug_hooks->set_name (t, decl);
+ TYPE_NAME (t) = decl;
+ }
+ }
if (TYPE_LANG_SPECIFIC (type))
TYPE_WAS_ANONYMOUS (type) = 1;
@@ -9513,9 +9516,6 @@ grokdeclarator (const cp_declarator *declarator,
if (!processing_template_decl)
cp_apply_type_quals_to_decl (type_quals, decl);
- if (set_no_warning)
- TREE_NO_WARNING (decl) = 1;
-
return decl;
}
}