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 D9A96385842E for ; Sat, 1 Oct 2022 07:08:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9A96385842E 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 2A8914203B; Sat, 1 Oct 2022 09:01:01 +0200 (CEST) Date: Sat, 1 Oct 2022 09:01:01 +0200 From: Jan-Benedict Glaw To: Gdb Subject: Issue with unittest/environ-selftests.c (DIAGNOSTIC_IGNORE_SELF_MOVE) Message-ID: <20221001070101.ydc7l3mntlfb7u4z@lug-owl.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f4cgd7mjrrgnduuf" Content-Disposition: inline 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=-10.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --f4cgd7mjrrgnduuf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! I'm mass-building toolchain components and recently got failures all over GDB when building it with quite recent GCC versions. Turns out GCC recently got -Wself-move (0abb78dda084a14b3d955757c6431fff71c263f3), but during unittests, that is only dealt with when building with clang. Building is done like this: =2E../configure --prefix=3D/tmp/gdb-m68k-linux --target=3Dm68k-linux make V=3D1 all-gdb /usr/lib/gcc-snapshot/bin/g++ -x c++ -I. -I. -I./config -DLOCALEDIR=3D"\= "/tmp/gdb-m68k-linux/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode = -I./../readline/readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include= -I../libdecnumber -I./../libdecnumber -I./../gnulib/import -I../gnulib/im= port -I./.. -I.. -I./../libbacktrace/ -I../libbacktrace/ -DTUI=3D1 -I./= =2E. -pthread -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-va= riable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wun= used-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-err= or=3Dmaybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit= -fallthrough=3D3 -Wduplicated-cond -Wshadow=3Dlocal -Wdeprecated-copy -Wdep= recated-copy-dtor -Wredundant-move -Wmissing-declarations -Wstrict-null-sen= tinel -Wformat -Wformat-nonliteral -Werror -g -O2 -c -o unittests/environ= -selftests.o -MT unittests/environ-selftests.o -MMD -MP -MF unittests/.deps= /environ-selftests.Tpo unittests/environ-selftests.c unittests/environ-selftests.c: In function 'void selftests::gdb_environ_tes= ts::test_self_move()': unittests/environ-selftests.c:228:7: error: moving 'env' of type 'gdb_envir= on' to itself [-Werror=3Dself-move] 228 | env =3D std::move (env); | ~~~~^~~~~~~~~~~~~~~~~ unittests/environ-selftests.c:228:7: note: remove 'std::move' call cc1plus: all warnings being treated as errors make[1]: *** [Makefile:1896: unittests/environ-selftests.o] Error 1 make[1]: Leaving directory '/var/lib/laminar/run/gdb-m68k-linux/3/binutils-= gdb/gdb' make: *** [Makefile:13193: all-gdb] Error 2 include: * diagnostics.h (DIAGNOSTIC_IGNORE_SELF_MOVE): Define for GCC 13+. diff --git a/include/diagnostics.h b/include/diagnostics.h index 4161dff6abc..c1a2e8f520c 100644 --- a/include/diagnostics.h +++ b/include/diagnostics.h @@ -99,6 +99,10 @@ DIAGNOSTIC_IGNORE ("-Wunused-but-set-variable") # endif =20 +# if __GNUC__ >=3D 13 +# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move") +# endif + /* GCC 4.8's "diagnostic push/pop" seems broken when using this, -Wswitch remains enabled at the error level even after a pop. Therefore, don't use it for GCC < 5. */ Ok for HEAD? Or should I send that to the Binutils mailing list? Thanks, Jan-Benedict --=20 --f4cgd7mjrrgnduuf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQlDTvPcScNjKREqWEdvV51g5nhuwUCYzflqgAKCRAdvV51g5nh u4xCAJ4850CVfF4IEjyKOuc6EJG8/8C42gCfXjMDEVG/11/CmHpfnOaKlI84gCA= =5d+L -----END PGP SIGNATURE----- --f4cgd7mjrrgnduuf--