From nobody Thu Dec 23 23:34:48 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DCB2118FC97A; Thu, 23 Dec 2021 23:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JKmkc4h2Fz51dB; Thu, 23 Dec 2021 23:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81D9A19D84; Thu, 23 Dec 2021 23:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BNNYm9X097856; Thu, 23 Dec 2021 23:34:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BNNYm5E097855; Thu, 23 Dec 2021 23:34:48 GMT (envelope-from git) Date: Thu, 23 Dec 2021 23:34:48 GMT Message-Id: <202112232334.1BNNYm5E097855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 58a2ebf3294f - stable/12 - Disable clang 12 -Wcompound-token-split-by-macro warning for atomic-v4.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 58a2ebf3294f0b6ac3f92e66d477595073b2bf54 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640302488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qjsDT35ueahTVJTICHjp7eXZXUFjZo2W0EvIscFKQWY=; b=H+/ROEt2Nz/ywVhlIGFl18kgMSQtKmRLxQXfeRtAE69aYfW2lCS/a1zmL+io1Hd1vDHJkd /ncswLpKBk8y/Ba6K69mAngU7+uN9cpiA2MhiEDHNRzJGG0Iiou/d2HW/CE6S1j5lCBENu U/ttC+RicyAfwPw6jyTY2ZKGwMUp8bh5N2SSKFWKU1ES/+/jiq8Kh7r+nehwZYzkFpuwag Y+WsODlvOPH5OJJ3v/IDcVkjIGokTFlyIkAAywtnGWpSYoBo9XV3FjTuJNpEhFAliRHEyZ mRgGTeeZV1enzYpE/NcLDCRnystH8iNAGE6Vp4qN2muVWJNboh+A34hArizRZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640302488; a=rsa-sha256; cv=none; b=f3vNCaO/hsu5B+3Wj5wbQtJH1TAqS0SW01P1mSomgyhc2755s2xrXhX74p+M3GGMoBr0nF TgkcrxVey6rH4O9Cf6Oc8p5IS9kumL7Ei+M9LYjjDinIt+o2J06SQ71S/1xV4eiUVbn5GH HpFs+13Fe6t3PLha9uDULoNLVq6mZw/SjywHHTj9fSfYeMqWMp1I3uXoSECKiqjSSleYIw bSBxuZ1j8gCAGacF1h82EfmDcN2JtkM3JpIpCnZqKmFI7Sfhl88JV4dJkYRduc2PjSFokn nBKRIn0x6wvyEeLVKwovd+IDz6Aj/LRCwy5wC4Flx+Qt3O/O0D1EQD4WXRty0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=58a2ebf3294f0b6ac3f92e66d477595073b2bf54 commit 58a2ebf3294f0b6ac3f92e66d477595073b2bf54 Author: Dimitry Andric AuthorDate: 2021-12-23 23:25:42 +0000 Commit: Dimitry Andric CommitDate: 2021-12-23 23:34:22 +0000 Disable clang 12 -Wcompound-token-split-by-macro warning for atomic-v4.h Otherwise, the macros will in sys/arm/include/atomic-v4.h will result in warnings (causing -Werror errors), similar to: arm.arm/tmp/usr/include/machine/atomic-v4.h:125:2: error: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Werror,-Wcompound-token-split-by-macro] __with_interrupts_disabled( ^~~~~~~~~~~~~~~~~~~~~~~~~~~ The macros could be restructured to avoid this splitting of statement expressions, but it is less disruptive to silence the warning for clang >= 12. Direct commit to stable/12, since atomic-v4.h is gone (together with arm.arm) in stable/13 and later. --- sys/arm/include/atomic-v4.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/arm/include/atomic-v4.h b/sys/arm/include/atomic-v4.h index a0083e00deaa..1d1df74af5f9 100644 --- a/sys/arm/include/atomic-v4.h +++ b/sys/arm/include/atomic-v4.h @@ -55,6 +55,11 @@ #define wmb() dmb() #define rmb() dmb() +#if defined(__clang_major__) && __clang_major__ >= 12 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcompound-token-split-by-macro" +#endif + #define __with_interrupts_disabled(expr) \ do { \ u_int cpsr_save, tmp; \ @@ -566,6 +571,10 @@ atomic_swap_32(volatile u_int32_t *p, u_int32_t v) #define atomic_load_acq_long atomic_load_long #undef __with_interrupts_disabled +#if defined(__clang_major__) && __clang_major__ >= 12 +#pragma clang diagnostic pop +#endif + static __inline void atomic_add_long(volatile u_long *p, u_long v) {