diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 1 | ||||
-rw-r--r-- | gcc/cp/decl.c | 10 | ||||
-rw-r--r-- | gcc/cp/tree.c | 8 |
4 files changed, 22 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 80d86c8..cfab057 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2010-05-28 Dodji Seketeli <dodji@redhat.com> + + Revert fix of PR c++/44188 + * cp-tree.h (typedef_variant_p): Revert moving this declaration to + gcc/tree.h. + * tree.c (typedef_variant_p): Revert moving this definition to + gcc/tree.c. + * decl.c (grokdeclarator): Revert naming typedef handling. + 2010-05-27 Joseph Myers <joseph@codesourcery.com> * call.c: Include diagnostic-core.h instead of diagnostic.h. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 4d3cf7d..37a0f1e 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5256,6 +5256,7 @@ 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 533b56f..0d30340 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9081,12 +9081,10 @@ grokdeclarator (const cp_declarator *declarator, for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t)) { if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t))) - /* 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; + { + 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 5421980..d5ccd65 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1055,6 +1055,14 @@ 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. */ |