diff options
author | Janis Johnson <janis187@us.ibm.com> | 2010-01-21 05:49:35 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-01-21 00:49:35 -0500 |
commit | ebf0bf7f49c75c98d4c51e8c451eae068a2dd647 (patch) | |
tree | 3bec735a0f06546a748f8a6b206f44f1a8b31297 /gcc/c-decl.c | |
parent | 907c6efdbc255042ab1ece9179511b78f426cb00 (diff) | |
download | gcc-ebf0bf7f49c75c98d4c51e8c451eae068a2dd647.zip gcc-ebf0bf7f49c75c98d4c51e8c451eae068a2dd647.tar.gz gcc-ebf0bf7f49c75c98d4c51e8c451eae068a2dd647.tar.bz2 |
tree.h (TYPE_TRANSPARENT_UNION): Replace with ...
* tree.h (TYPE_TRANSPARENT_UNION): Replace with ...
(TYPE_TRANSPARENT_AGGR): this, for union and record.
* calls.c (initialize argument_information): Handle it.
* c-common.c (handle_transparent_union_attribute): Use new name.
* c-decl.c (finish_struct): Ditto.
* c-typeck.c (type_lists_compatible_p): Ditto.
(convert_for_assignment): Use new name and also handle record.
* function.c (aggregate_value_p): Handle it.
(pass_by_reference): Ditto.
(assign_parm_data_types): Ditto.
* print-tree.c (print_node): Ditto.
* lto-streamer-in.c (unpack_ts_type_value_fields): Ditto.
* lto-streamer-out.c (pack_ts_type_value_fields): Ditto.
* tree.c (first_field): New fn.
gcc/cp/
* mangle.c (write_type): Mangle transparent record as member type.
* semantics.c (begin_class_definition): Recognize decimal classes
and set TYPE_TRANSPARENT_AGGR.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r156106
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 91d5884..e48cdc8 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -6953,10 +6953,10 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes, /* If this was supposed to be a transparent union, but we can't make it one, warn and turn off the flag. */ if (TREE_CODE (t) == UNION_TYPE - && TYPE_TRANSPARENT_UNION (t) + && TYPE_TRANSPARENT_AGGR (t) && (!TYPE_FIELDS (t) || TYPE_MODE (t) != DECL_MODE (TYPE_FIELDS (t)))) { - TYPE_TRANSPARENT_UNION (t) = 0; + TYPE_TRANSPARENT_AGGR (t) = 0; warning_at (loc, 0, "union cannot be made transparent"); } |