]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl.c (components_to_record): Improve comment.
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 26 Jan 2008 09:29:00 +0000 (09:29 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 26 Jan 2008 09:29:00 +0000 (09:29 +0000)
* decl.c (components_to_record): Improve comment.

From-SVN: r131858

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

index 9db0f846c6428895f8837ad981a866cb859a4c5c..1183d0f3f81024327a2b23ddcb0dc9ce40e31ac0 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 c57e145ff61c308b535257a0f5cd466f5a5fdaf7..9945e4ed3e114aa7542bc7cbe35227d92dc38f83 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