diff options
author | Jason Merrill <jason@redhat.com> | 2007-11-19 16:35:13 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2007-11-19 16:35:13 -0500 |
commit | 4009f2e7f047aafc40fc9a27d884497e87ae0c05 (patch) | |
tree | 1d16dbdc75464cebb92ce8862847635b43953c3f /gcc/tree-inline.c | |
parent | 4d4447b56b603b0786a0de3601ba45618dc6816c (diff) | |
download | gcc-4009f2e7f047aafc40fc9a27d884497e87ae0c05.zip gcc-4009f2e7f047aafc40fc9a27d884497e87ae0c05.tar.gz gcc-4009f2e7f047aafc40fc9a27d884497e87ae0c05.tar.bz2 |
PR debug/29436, c/32326
PR debug/29436, c/32326
* tree.c (build_type_attribute_qual_variant): Refuse to make
a distinct copy of a struct/enum type. Use build_distinct_type_copy.
* doc/extend.texi (Type Attributes): Don't encourage people to add
attributes to struct/enum types in a typedef. Fix
transparent_union example.
* tree-inline.c (remap_type_1): Remove code that's redundant with
remap_type.
(build_duplicate_type): Set id.copy_decl.
* c-common.c (handle_transparent_union_attribute): Simplify logic.
From-SVN: r130297
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index e0d4093..da52d6c 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -273,24 +273,8 @@ remap_decl (tree decl, copy_body_data *id) static tree remap_type_1 (tree type, copy_body_data *id) { - tree *node; tree new, t; - if (type == NULL) - return type; - - /* See if we have remapped this type. */ - node = (tree *) pointer_map_contains (id->decl_map, type); - if (node) - return *node; - - /* The type only needs remapping if it's variably modified. */ - if (! variably_modified_type_p (type, id->src_fn)) - { - insert_decl_map (id, type, type); - return type; - } - /* We do need a copy. build and register it now. If this is a pointer or reference type, remap the designated type and make a new pointer or reference type. */ @@ -3593,6 +3577,7 @@ build_duplicate_type (tree type) id.dst_fn = current_function_decl; id.src_cfun = cfun; id.decl_map = pointer_map_create (); + id.copy_decl = copy_decl_no_change; type = remap_type_1 (type, &id); |