Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkP7U-0002sC-4F for pgsql-committers@arkaria.postgresql.org; Tue, 09 Nov 2021 11:16:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mkP7T-0004IK-1E for pgsql-committers@arkaria.postgresql.org; Tue, 09 Nov 2021 11:16:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkP7R-0004IB-BG for pgsql-committers@lists.postgresql.org; Tue, 09 Nov 2021 11:16:50 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkP7L-00010z-Ef for pgsql-committers@lists.postgresql.org; Tue, 09 Nov 2021 11:16:48 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 372053200929; Tue, 9 Nov 2021 06:16:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 09 Nov 2021 06:16:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=+bqVcKERDXtZ4QrheOrWfJ0XMAf tYzJixL9jmkMaFrk=; b=gUgoqCikWtcl3vIyBq0OdYNmvljduUrp9NxX25t6JMW oo8kxexElExuphUn4IRqAmCDzOxwLdlu+9nTB9qdD/OAyH5oGyrXDUR85YUsD4bG gelE4tgnVAHdUaFUgFNGh4k/8yrZ9PFnmXESZKKvP5OpNXvWd4L/vG5IJ716FQf6 7WbZEejYfxLbtfubyGtjFWG3qJdQVl2mcnuD7AwFiVRTDSo4hImYuflkF/+7YBL+ h/xjPRtdRD8aA+X74+cfOAk+3t6J07Q3Rhsn9JlNwO0G5cykRdk8cfk3nCrUZpsx VIeXXGKsXGqCX9Bq93XADWUnUHK/sIyeZ1cRBMqsXCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=+bqVcK ERDXtZ4QrheOrWfJ0XMAftYzJixL9jmkMaFrk=; b=cEAKlH2w0S0ArPR6vzdXGk le5GUQVtrceaOvwAn/J3PcVLKP/QvOqmGdYhRAd30tVA5t+gWKj1jch05wRskQKE 1Ky0gZrH8K9kPjIgwb3e2pP2YlVhj7xV7L+KxwwZG34oSa1FcBh/QVfK4ggQDPHL P7U3lms/WOWdEXZcgjEySVyJMAQr+3xk1M5ML+kWqAa9Z8BVm9Xz7W9IRyzVzQQP GVk7uGZPLO/tncYX8cQr4ne/zTaOnJl/2hagjC9zkC0l2KB23zIS/mrtvJKqbmtV J/NBFAucgGzmip0KSK9YvFDWR5Qw2hbCknAsxa9JeOl+9YOVms8ysSaR+Q+gBCWw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudeggddviecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepfffhvf fukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhi vghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnh epvdegudeuhfdtueeltedtveejheehieevueeigeelteegleejleeiueeiheegvefhnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrg gvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Nov 2021 06:16:37 -0500 (EST) Date: Tue, 9 Nov 2021 20:16:32 +0900 From: Michael Paquier To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix incorrect format placeholder. Message-ID: References: <1100878.1636435176@sss.pgh.pa.us> <1103686.1636437986@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4Y4VHgW0iWQiFjWW" Content-Disposition: inline In-Reply-To: <1103686.1636437986@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --4Y4VHgW0iWQiFjWW Content-Type: multipart/mixed; boundary="4ocpFma+AyeIKFc1" Content-Disposition: inline --4ocpFma+AyeIKFc1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 09, 2021 at 01:06:26AM -0500, Tom Lane wrote: > I figured the Perl guys would do something about it, but it will be a > very long time before that propagates everywhere. Maybe we should > teach configure to add -Wno-compound-token-split-by-macro? By my > count there are now five buildfarm members besides dangomushi that > are producing these warnings, and I think the number is going to > go up before it goes down. >=20 > (Meanwhile, I guess I could enable -Werror on florican.) Yeah, you have a point here. -Wcompound-token-split-by-macro is new as of clang-12 from last April, so I am a bit surprised that it is that present in the buildfarm TBH. The attached is sufficient to remove those warnings. Debian provides clang-12, so it is easy to reproduce the problem. What do you think? -- Michael --4ocpFma+AyeIKFc1 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="plperl-clang-warnings.patch" diff --git a/configure b/configure index 4ffefe4655..6856ec649d 100755 --- a/configure +++ b/configure @@ -6334,6 +6334,52 @@ fi if test -n "$NOT_THE_CFLAGS"; then CFLAGS="$CFLAGS -Wno-unused-command-line-argument" fi + # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot + # of warnings when building plperl because of Perl. Like previously, test + # for the positive form and add the negative form + NOT_THE_CFLAGS="" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5 +$as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; } +if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then : + $as_echo_n "(cached) " >&6 +else + pgac_save_CFLAGS=$CFLAGS +pgac_save_CC=$CC +CC=${CC} +CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro" +ac_save_c_werror_flag=$ac_c_werror_flag +ac_c_werror_flag=yes +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes +else + pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_c_werror_flag=$ac_save_c_werror_flag +CFLAGS="$pgac_save_CFLAGS" +CC="$pgac_save_CC" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5 +$as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; } +if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then + NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro" +fi + + + if test -n "$NOT_THE_CFLAGS"; then + CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro" + fi # Similarly disable useless truncation warnings from gcc 8+ NOT_THE_CFLAGS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5 diff --git a/configure.ac b/configure.ac index 44ee3ebe2f..05a00b3e14 100644 --- a/configure.ac +++ b/configure.ac @@ -530,6 +530,14 @@ if test "$GCC" = yes -a "$ICC" = no; then if test -n "$NOT_THE_CFLAGS"; then CFLAGS="$CFLAGS -Wno-unused-command-line-argument" fi + # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot + # of warnings when building plperl because of Perl. Like previously, test + # for the positive form and add the negative form + NOT_THE_CFLAGS="" + PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wcompound-token-split-by-macro]) + if test -n "$NOT_THE_CFLAGS"; then + CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro" + fi # Similarly disable useless truncation warnings from gcc 8+ NOT_THE_CFLAGS="" PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wformat-truncation]) --4ocpFma+AyeIKFc1-- --4Y4VHgW0iWQiFjWW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmGKWJAACgkQnvQgOdby QH2Axw//d0qMyZoNIt3gc+9Okp1YHaTzni3WP/WzEHUvQmPZNKtUD0qAJWRBdQSz y83P6m1bOQxY5iED3Nk6mabrL7gcNKxRzN63Fw+mLgGSzS712nSqg7OxalTTPnBv hXhINDuAT2joAQoekwo9ERngpYTXgwB7BR2RbvfKP0JsAPP6ql6IDr1sJn8c2Ms+ Z+iwZ0PALTCUsRHRUkK41gPGfmvrOKKGhr062SFb4lKpd6D0kWP8PkEYXyLhi9OW Wb6lldNDU73CdgnU0U4qa/ms7I/psLpSO2XwMpnPIximI52Z/iHCtiriBtr5+hOa EzNWE58HOPYHCtNx9GdR6kR/BMBIM4AKwQ5oG7mMWz6CD7UQdsYCr3W7qQM3VdgG gaO0DvtYANAVTTub4lbhDoawQEIKkmtLJnisqtlOYzmm/Xp/+8WHba9ccNhtu6+g AB40hzAsqrfUfGIaNnkusvWoxnlU7dzz66hGO7nyBrStMXWFBfuxYalrzSnhf8sh egulYROqXxYQ5LvoOjRG8XPgEcwR7rWkkgWEqR2/SrsgyAixuhY6TlGRJI7m61w1 qV1Rw08J+3vuNehu9Xdoi2gN8hAJhzX521qfsGAvMvA3HH8G3DDZyabEqJK9RNlQ WYP8Ut2m8GwQ9+LbaRsFEoyo08VCAzWyrU6sf8UjnsrRzdtxpNI= =n24X -----END PGP SIGNATURE----- --4Y4VHgW0iWQiFjWW--