From: Ghjuvan Lacambre Date: Tue, 26 Apr 2022 07:44:55 +0000 (+0200) Subject: [Ada] Fix record layout warnings not being tagged X-Git-Tag: basepoints/gcc-14~6250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=134758eed2d3cde5810a037be0f1a6744a7cfcd8;p=thirdparty%2Fgcc.git [Ada] Fix record layout warnings not being tagged This allows tools ingesting GNAT's output to properly classify these messages. gcc/ada/ * gcc-interface/decl.cc (warn_on_field_placement): Add insertion character '.q' to warning string. --- diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 9574dbbb396..6e22feb39b7 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -7770,20 +7770,20 @@ warn_on_field_placement (tree gnu_field, Node_Id gnat_component_list, const char *msg1 = in_variant - ? "??variant layout may cause performance issues" - : "??record layout may cause performance issues"; + ? "?.q?variant layout may cause performance issues" + : "?.q?record layout may cause performance issues"; const char *msg2 = Ekind (gnat_field) == E_Discriminant - ? "??discriminant & whose length is not multiple of a byte" + ? "?.q?discriminant & whose length is not multiple of a byte" : field_has_self_size (gnu_field) - ? "??component & whose length depends on a discriminant" + ? "?.q?component & whose length depends on a discriminant" : field_has_variable_size (gnu_field) - ? "??component & whose length is not fixed" - : "??component & whose length is not multiple of a byte"; + ? "?.q?component & whose length is not fixed" + : "?.q?component & whose length is not multiple of a byte"; const char *msg3 = do_reorder - ? "??comes too early and was moved down" - : "??comes too early and ought to be moved down"; + ? "?.q?comes too early and was moved down" + : "?.q?comes too early and ought to be moved down"; post_error (msg1, gnat_field); post_error_ne (msg2, gnat_field, gnat_field);