aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorViljar Indus <indus@adacore.com>2024-08-13 11:37:31 +0300
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-08-29 15:06:27 +0200
commit6a3ff84a7790ae008e5f557d74c83bcf196c2162 (patch)
treef5b0501dc1f7833d7937d5db95a902fa28c02967 /gcc
parenta383d7bb732a38649a46696a2c4386d825054050 (diff)
downloadgcc-6a3ff84a7790ae008e5f557d74c83bcf196c2162.zip
gcc-6a3ff84a7790ae008e5f557d74c83bcf196c2162.tar.gz
gcc-6a3ff84a7790ae008e5f557d74c83bcf196c2162.tar.bz2
ada: Display actual line length in line length check
gcc/ada/ * styleg.adb (Check_Line_Max_Length): Add the actual line length to the diagnostic message.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/styleg.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index c405dec..74b629c 100644
--- a/gcc/ada/styleg.adb
+++ b/gcc/ada/styleg.adb
@@ -38,6 +38,7 @@ with Sinfo; use Sinfo;
with Sinfo.Nodes; use Sinfo.Nodes;
with Sinput; use Sinput;
with Stylesw; use Stylesw;
+with Uintp; use Uintp;
package body Styleg is
@@ -672,8 +673,9 @@ package body Styleg is
begin
if Style_Check_Max_Line_Length then
if Len > Style_Max_Line_Length then
+ Error_Msg_Uint_1 := UI_From_Int (Len);
Error_Msg
- ("(style) this line is too long?M?",
+ ("(style) this line is too long: ^?M?",
Current_Line_Start + Source_Ptr (Style_Max_Line_Length));
end if;
end if;