comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: Did I find a (nearly-)gotcha here?
Date: Sun, 14 Nov 2021 09:25:45 +0100	[thread overview]
Message-ID: <smqh6a$e85$1@dont-email.me> (raw)
In-Reply-To: <smnuf8$s9h$1@dont-email.me>

On 13.11.21 09:53, Rod Kay wrote:
> On 13/11/21 18:46, reinert wrote:
>>
>>     procedure test_a(ok :    out Boolean) is
>>     begin
>>        if false then
>>           ok := true;
>>        end if;
>>     end test_a;
>>
>> However, I think I remember that (some) older versions of the GNAT compiler gave a different result. Could others try?  And does my program example reveal an unnecessary gotcha?
>>
>     I'd expect GNAT to issue a warning. Probably you need to add a flag to GNAT to enable that warning. Perhaps try adding '-gnatwa'.

GCC's -Wuninitialized does as Rod Kay says.

      reply	other threads:[~2021-11-14  8:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13  7:46 Did I find a (nearly-)gotcha here? reinert
2021-11-13  8:52 ` Niklas Holsti
2021-11-13  8:53 ` Rod Kay
2021-11-14  8:25   ` G.B. [this message]
replies disabled

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