* decl.c (components_to_record): Improve comment.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 26 Jan 2008 09:29:00 +0000 (09:29 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 26 Jan 2008 09:29:00 +0000 (09:29 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131858 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/decl.c

index 9db0f84..1183d0f 100644 (file)
@@ -1,3 +1,7 @@
+2008-01-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * decl.c (components_to_record): Improve comment.
+
 2008-01-22  Eric Botcazou  <ebotcazou@adacore.com>
 
        * decl.c (components_to_record): Do not reuse the empty union type
index c57e145..9945e4e 100644 (file)
@@ -6066,8 +6066,9 @@ components_to_record (tree gnu_record_type, Node_Id component_list,
          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