comp.lang.ada
 help / color / mirror / Atom feed
From: Bill Findlay <findlaybill@blueyonder.co.uk>
Subject: Re: [ANN] GCC 14.2.0-3 (aarch64, macOS)
Date: Thu, 21 Nov 2024 15:30:22 +0000	[thread overview]
Message-ID: <0001HW.2CEF898E0005B91A30DDA538F@news.individual.net> (raw)
In-Reply-To: lyserpq5wi.fsf@pushface.org

On 17 Nov 2024, Simon Wright wrote
(in article <lyserpq5wi.fsf@pushface.org>):

> Available at [1]. Included tools at v25.0.0.
>
> [1] https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-14.2.0-3
> -aarch64

Hi Simon, many thanks for that.

I note that 14.2.0-3 has the same issue as all previous 14.2 versions:
a spurious error message on a simple string concatenation,
which appears only when link-time optimization is called for:

gnatmake -aI../Source -aO../Build -funwind-tables -gnatl12j96 -gnatw.e 
-gnatwD -gnatwH -gnatwP -gnatwT -gnatw.W -gnatw.B -gnatwC -gnatw.u -gnatyO 
-gnatw.Y -gnatw.N -fdata-sections -ffunction-sections -O3 -flto askance 
-bargs -static -Sin -largs -Wl,-dead_strip -Wl,-dead_strip -largs -flto
...
gnatbind -aI../Source -aO../Build -static -Sin -x askance.ali
gnatlink askance.ali -funwind-tables -fdata-sections -ffunction-sections -O3 
-flto -Wl,-dead_strip -Wl,-dead_strip -flto
lto-wrapper: warning: using serial compilation of 4 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more information
/Users/wf/KDF9/emulation/Source/posix.adb: In function 'posix__output_line':
/Users/wf/KDF9/emulation/Source/posix.adb:277:49: warning: '__builtin_memcpy' 
writing between 1 and 2147483647 bytes into a region of size 0 
[-Wstringop-overflow=]
277 | message_line : constant String := message &  NL;
| ^

This is in the routine:

procedure output_line (message : in String) is
message_line : String := message &  NL;
begin
output(message_line);
end output_line;

where:

NL : constant String := OS_specifics.EOL;

in the package spec., and:

package body OS_specifics is

function EOL
return String
is (1 =>  Character'Val(16#0A#));
...

Changing the complained-of line to:

message_line : String := message &  (NL &  "");

makes the warning go away.

-- 
Bill Findlay

  reply	other threads:[~2024-11-21 15:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17 14:41 [ANN] GCC 14.2.0-3 (aarch64, macOS) Simon Wright
2024-11-21 15:30 ` Bill Findlay [this message]
2024-11-21 15:45   ` moi
2024-11-21 20:40   ` Simon Wright
2024-11-22  1:18     ` moi
2024-11-22 10:02   ` Björn Persson
2024-11-24  0:19     ` moi
2024-11-24 11:17       ` Simon Wright
2024-11-26 15:48       ` Björn Persson
2024-11-29 19:08       ` Björn Persson
2024-11-29 20:52         ` Simon Wright
2024-11-29 21:21           ` Keith Thompson
2024-11-29 22:25             ` Simon Wright
2024-11-29 22:52             ` Björn Persson
2024-11-30 21:15             ` Keith Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox