From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lug-owl.de (lug-owl.de [188.68.32.151]) by sourceware.org (Postfix) with ESMTPS id D564A38312AB for ; Mon, 27 Jun 2022 18:58:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D564A38312AB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lug-owl.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lug-owl.de Received: by lug-owl.de (Postfix, from userid 1001) id 0560741FA7; Mon, 27 Jun 2022 20:58:26 +0200 (CEST) Date: Mon, 27 Jun 2022 20:58:26 +0200 From: Jan-Benedict Glaw To: Pierre-Marie de Rodat Cc: gcc-patches@gcc.gnu.org, Yannick Moy , charlet@adacore.com Subject: Re: [Ada] Remove useless pragma Warnings Off from runtime units Message-ID: <20220627185825.ed6rcjbjo5p2hqzp@lug-owl.de> References: <20220512124009.GA781082@adacore.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gf4dleheznhf7k4o" Content-Disposition: inline In-Reply-To: <20220512124009.GA781082@adacore.com> X-Operating-System: Linux chamaeleon 5.14.0-0.bpo.2-amd64 X-gpg-fingerprint: 250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB X-gpg-key: wwwkeys.de.pgp.net X-Echelon-Enable: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-TKUeV: howto poison arsenous mail psychological biological nuclear warfare test the bombastical terror of flooding the spy listeners explosion sex drugs and rock'n'roll X-message-flag: Please send plain text messages only. Do not send HTML emails. Thank you. User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2022 18:58:32 -0000 --gf4dleheznhf7k4o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! On Thu, 2022-05-12 12:40:09 +0000, Pierre-Marie de Rodat via Gcc-patches wrote: > GNAT does not issue a warning anymore on a postcondition of True (used > here to prevent inining inside GNATprove for proof). >=20 > Tested on x86_64-pc-linux-gnu, committed on trunk >=20 > gcc/ada/ >=20 > * libgnat/s-valuei.ads: Remove pragma Warnings Off. > * libgnat/s-valueu.ads: Same. > * libgnat/s-valuti.ads: Same. > diff --git a/gcc/ada/libgnat/s-valuei.ads b/gcc/ada/libgnat/s-valuei.ads > --- a/gcc/ada/libgnat/s-valuei.ads > +++ b/gcc/ada/libgnat/s-valuei.ads > @@ -37,8 +37,6 @@ pragma Assertion_Policy (Pre =3D> Ignore, > Contract_Cases =3D> Ignore, > Ghost =3D> Ignore, > Subprogram_Variant =3D> Ignore); > -pragma Warnings (Off, "postcondition does not mention function result"); > --- True postconditions are used to avoid inlining for GNATprove For me, this patch broke building a basic cross compiler using Debian sid's "gcc-snapshot" package as the build/host compiler: =2E./gcc/configure '--with-pkgversion=3Dbasepoints/gcc-13-1183-g70454c50b45= , built at 1655800680' --prefix=3D/var/lib/laminar/run/gcc-vax-linux/5/tool= chain-install --enable-werror-always --enable-languages=3Dall --disable-gco= v --disable-shared --disable-threads --target=3Dvax-linux --without-headers [...] make V=3D1 all-gcc [...] /usr/lib/gcc-snapshot/bin/gcc -c -g -O2 -gnatpg -gnata -W -Wall -nostdin= c -I- -I. -Iada/generated -Iada -I../../gcc/gcc/ada -Iada/libgnat -I../../g= cc/gcc/ada/libgnat -Iada/gcc-interface -I../../gcc/gcc/ada/gcc-interface ..= /../gcc/gcc/ada/libgnat/s-valint.adb -o ada/libgnat/s-valint.o mkdir -p ada/libgnat/ /usr/lib/gcc-snapshot/bin/gcc -c -g -O2 -gnatpg -gnata -W -Wall -nostdin= c -I- -I. -Iada/generated -Iada -I../../gcc/gcc/ada -Iada/libgnat -I../../g= cc/gcc/ada/libgnat -Iada/gcc-interface -I../../gcc/gcc/ada/gcc-interface ..= /../gcc/gcc/ada/libgnat/s-valuns.adb -o ada/libgnat/s-valuns.o mkdir -p ada/libgnat/ /usr/lib/gcc-snapshot/bin/gcc -c -g -O2 -gnatpg -gnata -W -Wall -nostdin= c -I- -I. -Iada/generated -Iada -I../../gcc/gcc/ada -Iada/libgnat -I../../g= cc/gcc/ada/libgnat -Iada/gcc-interface -I../../gcc/gcc/ada/gcc-interface ..= /../gcc/gcc/ada/libgnat/s-valuti.adb -o ada/libgnat/s-valuti.o s-valuti.ads:63:06: warning: postcondition does not mention function result= [-gnatw.t] make[1]: *** [../../gcc/gcc/ada/gcc-interface/Make-lang.in:167: ada/libgnat= /s-valuti.o] Error 1 make[1]: Leaving directory '/var/lib/laminar/run/gcc-vax-linux/5/toolchain-= build/gcc' make: *** [Makefile:4615: all-gcc] Error 2 I'm not an Ada developer, just keeping an eye on GCC and doing automated builds. Looking at the patch it seems that switching off the "postcondition does not mention function result" warning was done under the impression that only a _very_ new GCC is used and my "gcc-snapshot" package is too old to already contain the fixes submitted in the patches before this pragma removal. If that's correct, that boils down to a specific minimum version to build with, or adding back the pragmas to allow a bootstrap with an older compiler version. Thanks, Jan-Benedict --=20 --gf4dleheznhf7k4o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCYrn9zgAKCRAdvV51g5nh u47KAJ0ZzzLYjtI2ssowK2Zsc/jpJF89yQCcDyNFmxpifEUlCdaPWcMo7PJ+9Wc= =STOY -----END PGP SIGNATURE----- --gf4dleheznhf7k4o--