From 8fa07a56dfd1e9a357e5ee498d55097d76695628 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 26 Jan 2008 09:29:00 +0000 Subject: [PATCH] decl.c (components_to_record): Improve comment. * decl.c (components_to_record): Improve comment. From-SVN: r131858 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/decl.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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 -- 2.47.2