This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Improve comment
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 26 Jan 2008 10:30:00 +0100
- Subject: [Ada] Improve comment
It's related to the special layout given to "unchecked unions".
Tested on i586-suse-linux, applied on the mainline.
2008-01-26 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (components_to_record): Improve comment.
--
Eric Botcazou
Index: decl.c
===================================================================
--- decl.c (revision 131856)
+++ decl.c (working copy)
@@ -6066,8 +6066,9 @@ components_to_record (tree gnu_record_ty
Set_Present_Expr (variant, annotate_value (gnu_qual));
/* If this is an Unchecked_Union and we have exactly one field,
- use that field here. */
- if (unchecked_union && TYPE_FIELDS (gnu_variant_type)
+ use this field directly to match the layout of C unions. */
+ if (unchecked_union
+ && TYPE_FIELDS (gnu_variant_type)
&& !TREE_CHAIN (TYPE_FIELDS (gnu_variant_type)))
gnu_field = TYPE_FIELDS (gnu_variant_type);
else