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 ESMTP id 821C43857C71 for ; Mon, 26 Jul 2021 21:11:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 821C43857C71 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 E0CEA41ECA; Mon, 26 Jul 2021 23:11:01 +0200 (CEST) Date: Mon, 26 Jul 2021 23:11:01 +0200 From: Jan-Benedict Glaw To: gdb@sourceware.org Subject: Building with recent GCC versions: gdbsupport/gdb_assert.h:35:4: error: 'nonnull' argument 'filename' compared to NULL [-Werror=nonnull-compare] Message-ID: <20210726211101.ivychvbfgaafxjtz@lug-owl.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k34hod2wdex2gesf" Content-Disposition: inline X-Operating-System: Linux chamaeleon 5.8.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=-2.7 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2021 21:11:06 -0000 --k34hod2wdex2gesf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! I'm running some CI builds and noticed that, when building GDB with quite recent GCC versions, it breaks. With ie. this "gcc-snapshot" GCC from Debian: /usr/lib/gcc-snapshot/bin/gcc --version gcc (Debian 20210630-1) 12.0.0 20210630 (experimental) [master revision 6bf= 383c37e6:93c270320bb:35da8a98026849bd20d16bbf9210ac1d0b44ea6a] we see: =2E/configure --target=3Di686-linux --prefix=3D/tmp/gdb-i686-linux [...] all make V=3D1 all-gdb [...] [all 2021-07-26 20:39:22] /usr/lib/gcc-snapshot/bin/g++ -x c++ -I. -I. -= I./config -DLOCALEDIR=3D"\"/tmp/gdb-i686-linux/share/locale\"" -DHAVE_CONFI= G_H -I./../include/opcode -I./../readline/readline/.. -I./../zlib -I../bfd = -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./../gnu= lib/import -I../gnulib/import -I./.. -I.. -DTUI=3D1 -I./.. -pthread -W= all -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-f= unction -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-para= meter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=3Dmaybe-uninit= ialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3D3 = -Wduplicated-cond -Wshadow=3Dlocal -Wdeprecated-copy -Wdeprecated-copy-dtor= -Wredundant-move -Wmissing-declarations -Wstrict-null-sentinel -Wformat -W= format-nonliteral -Werror -g -O2 -c -o compile/compile.o -MT compile/comp= ile.o -MMD -MP -MF compile/.deps/compile.Tpo compile/compile.c [all 2021-07-26 20:39:26] In file included from ./../gdbsupport/common-defs= =2Eh:126, [all 2021-07-26 20:39:26] from ./defs.h:28, [all 2021-07-26 20:39:26] from compile/compile.c:20: [all 2021-07-26 20:39:26] ./../gdbsupport/gdb_unlinker.h: In constructor 'g= db::unlinker::unlinker(const char*)': [all 2021-07-26 20:39:26] ./../gdbsupport/gdb_assert.h:35:4: error: 'nonnul= l' argument 'filename' compared to NULL [-Werror=3Dnonnull-compare] [all 2021-07-26 20:39:26] 35 | ((void) ((expr) ? 0 : = \ [all 2021-07-26 20:39:26] | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [all 2021-07-26 20:39:26] 36 | (gdb_assert_fail (#expr, __FIL= E__, __LINE__, FUNCTION_NAME), 0))) [all 2021-07-26 20:39:26] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [all 2021-07-26 20:39:26] ./../gdbsupport/gdb_unlinker.h:38:5: note: in exp= ansion of macro 'gdb_assert' [all 2021-07-26 20:39:26] 38 | gdb_assert (filename !=3D NULL); [all 2021-07-26 20:39:26] | ^~~~~~~~~~ [all 2021-07-26 20:39:27] cc1plus: all warnings being treated as errors [all 2021-07-26 20:39:27] make[1]: *** [Makefile:1642: compile/compile.o] E= rror 1 [all 2021-07-26 20:39:27] make[1]: Leaving directory '/var/lib/laminar/run/= gdb-i686-linux/4/binutils-gdb/gdb' [all 2021-07-26 20:39:27] make: *** [Makefile:11410: all-gdb] Error 2 I also discussed this on the GCC patches mailing list (https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575568.html), where Martin suggested that this should be fixed here in GDB. Any thoughts about this? Thanks, Jan-Benedict --=20 --k34hod2wdex2gesf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCYP8k4gAKCRAdvV51g5nh u+5YAJ4jy6ZNg41qIAJm/3RtXWI4Lbb5jwCePNp3FjcIXrFxXfhNYgN+N1KooJk= =kax3 -----END PGP SIGNATURE----- --k34hod2wdex2gesf--