This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]