]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
utils.c (maybe_pad_type): Issue the warning for the specific case of component types...
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 27 May 2019 11:12:57 +0000 (11:12 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 27 May 2019 11:12:57 +0000 (11:12 +0000)
* gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
specific case of component types preferably.

From-SVN: r271656

gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils.c

index 9bfb21d3e76f0b76ee539481edc9e8cd03708193..27cedf9c020e62bd566466ede160e358435fb10c 100644 (file)
@@ -1,3 +1,8 @@
+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.
index da4e1009e8c5fb522de3317193155854102de395..ab8b93abf5ff2ea1b2708f193403541896490e3e 100644 (file)
@@ -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));
        }
     }