aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/cp-tree.h1
-rw-r--r--gcc/cp/decl.c10
-rw-r--r--gcc/cp/tree.c8
4 files changed, 15 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f63703e..f359b21 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2010-05-25 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/44188
+ * cp-tree.h (typedef_variant_p): Move this declaration to
+ gcc/tree.h.
+ * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
+ * decl.c (grokdeclarator): Do not rename debug info of an
+ anonymous tagged type named by a typedef.
+
2010-05-27 Jason Merrill <jason@redhat.com>
PR c++/43555
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 37a0f1e..4d3cf7d 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -5256,7 +5256,6 @@ extern bool type_has_nontrivial_copy_init (const_tree);
extern bool class_tmpl_impl_spec_p (const_tree);
extern int zero_init_p (const_tree);
extern tree strip_typedefs (tree);
-extern bool typedef_variant_p (tree);
extern void cp_set_underlying_type (tree);
extern tree copy_binfo (tree, tree, tree,
tree *, int);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0d30340..533b56f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -9081,10 +9081,12 @@ grokdeclarator (const cp_declarator *declarator,
for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t))
{
if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
- {
- debug_hooks->set_name (t, decl);
- TYPE_NAME (t) = decl;
- }
+ /* We do not rename the debug info representing the
+ anonymous tagged type because the standard says in
+ [dcl.typedef] that the naming applies only for
+ linkage purposes. */
+ /*debug_hooks->set_name (t, decl);*/
+ TYPE_NAME (t) = decl;
}
if (TYPE_LANG_SPECIFIC (type))
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index d5ccd65..5421980 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1055,14 +1055,6 @@ strip_typedefs (tree t)
return cp_build_qualified_type (result, cp_type_quals (t));
}
-/* Returns true iff TYPE is a type variant created for a typedef. */
-
-bool
-typedef_variant_p (tree type)
-{
- return is_typedef_decl (TYPE_NAME (type));
-}
-
/* Setup a TYPE_DECL node as a typedef representation.
See comments of set_underlying_type in c-common.c. */