From: Eric Botcazou Date: Sat, 26 Jan 2008 09:29:00 +0000 (+0000) Subject: decl.c (components_to_record): Improve comment. X-Git-Tag: releases/gcc-4.3.0~391 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fa07a56dfd1e9a357e5ee498d55097d76695628;p=thirdparty%2Fgcc.git decl.c (components_to_record): Improve comment. * decl.c (components_to_record): Improve comment. From-SVN: r131858 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9db0f846c642..1183d0f3f810 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2008-01-26 Eric Botcazou + + * decl.c (components_to_record): Improve comment. + 2008-01-22 Eric Botcazou * decl.c (components_to_record): Do not reuse the empty union type diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index c57e145ff61c..9945e4ed3e11 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -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