* [Ada] Fix record layout warnings not being tagged
@ 2022-06-02 9:09 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-06-02 9:09 UTC (permalink / raw)
To: gcc-patches; +Cc: Ghjuvan Lacambre
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
This allows tools ingesting GNAT's output to properly classify these
messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (warn_on_field_placement): Add insertion
character '.q' to warning string.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 1477 bytes --]
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
--- 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-02 9:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 9:09 [Ada] Fix record layout warnings not being tagged Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).