diff mbox series

[Ada] Fix minor warning issue

Message ID 5416066.6An7qLVlpd@polaris
State New
Headers show
Series [Ada] Fix minor warning issue | expand

Commit Message

Eric Botcazou May 27, 2019, 11:13 a.m. UTC
Tested on x86_64-suse-linux, applied on the mainline, 9 and 8 branches.


2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
	specific case of component types preferably.
diff mbox series

Patch

Index: gcc-interface/utils.c
===================================================================
--- gcc-interface/utils.c	(revision 271528)
+++ gcc-interface/utils.c	(working copy)
@@ -1530,14 +1530,14 @@  built:
 	 generated for some other corresponding source entity.  */
       if (Comes_From_Source (gnat_entity))
 	{
-	  if (Present (gnat_error_node))
-	    post_error_ne_tree ("{^ }bits of & unused?",
-				gnat_error_node, gnat_entity,
-				size_diffop (size, orig_size));
-	  else if (is_component_type)
+	  if (is_component_type)
 	    post_error_ne_tree ("component of& padded{ by ^ bits}?",
 				gnat_entity, gnat_entity,
 				size_diffop (size, orig_size));
+	  else if (Present (gnat_error_node))
+	    post_error_ne_tree ("{^ }bits of & unused?",
+				gnat_error_node, gnat_entity,
+				size_diffop (size, orig_size));
 	}
     }