[gcc/devel/omp/gcc-9] utils.c (maybe_pad_type): Issue the warning for the specific case of component types preferably.

Tobias Burnus burnus@gcc.gnu.org
Thu Mar 5 13:54:00 GMT 2020


https://gcc.gnu.org/g:b8b0a7dc69cafa89ea320202d0f86bf06b237b8f

commit b8b0a7dc69cafa89ea320202d0f86bf06b237b8f
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Mon May 27 11:12:57 2019 +0000

    utils.c (maybe_pad_type): Issue the warning for the specific case of component types preferably.
    
    	* gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
    	specific case of component types preferably.
    
    From-SVN: r271656

Diff:
---
 gcc/ada/ChangeLog             |  5 +++++
 gcc/ada/gcc-interface/utils.c | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 9bfb21d..27cedf9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
 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.
+
+2019-05-27  Eric Botcazou  <ebotcazou@adacore.com>
+
 	* gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
 	(gnat_to_gnu): Do not convert the result if it is a reference to an
 	unconstrained array used as the prefix of an attribute reference that
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index da4e100..ab8b93a 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -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));
 	}
     }



More information about the Gcc-cvs mailing list