Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6898C433DF for ; Thu, 28 May 2020 14:41:09 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 869C9207D3 for ; Thu, 28 May 2020 14:41:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 869C9207D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJiD-0006d7-Ap; Thu, 28 May 2020 14:40:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeJiD-0006cz-0D for xen-devel@lists.xenproject.org; Thu, 28 May 2020 14:40:49 +0000 X-Inumbo-ID: 33b9ef18-a0f1-11ea-81bc-bc764e2007e4 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 33b9ef18-a0f1-11ea-81bc-bc764e2007e4; Thu, 28 May 2020 14:40:40 +0000 (UTC) Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: B0tPt1oZmZtfZVk0/L0NGOLQ+wfZvyCCx2fkWMTTmrRNQcfGuApvslZJ44ku2jKqeCz3HbY1Wb ma8CcyoNOAm91tGEuQ9dldiOkBM1Zn3xCh5ojXFlP5nblUVGHs49aNn1BWjeZoMvP4zOQpqdCf 2TbfKobJwDikEaNjr4VKWLjG07LiaQnHah0jXfLbxB8F40YwP2mZBCucnyL95enV//7LT5dtV1 mj3UsWRczggiAFkFnckph0GZmdcyWIDzDXlsbHTAVbA0TkolSIQAzgVkmtX3se5JciIsY4QbtA krY= X-SBRS: 2.7 X-MesageID: 18922185 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,445,1583211600"; d="scan'208";a="18922185" From: Roger Pau Monne To: Subject: [PATCH v2 3/3] clang: don't define nocall Date: Thu, 28 May 2020 16:40:23 +0200 Message-ID: <20200528144023.10814-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200528144023.10814-1-roger.pau@citrix.com> References: <20200528144023.10814-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Clang doesn't support attribute error, and the possible equivalents like diagnose_if don't seem to work well in this case as they trigger when when the function is not called (just by being used by the APPEND_CALL macro). Define nocall to a noop on clang until a proper solution can be found. Signed-off-by: Roger Pau Monné --- xen/include/xen/compiler.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index c22439b7a4..225e09e5f7 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -20,7 +20,11 @@ #define __weak __attribute__((__weak__)) -#define nocall __attribute__((error("Nonstandard ABI"))) +#if !defined(__clang__) +# define nocall __attribute__((error("Nonstandard ABI"))) +#else +# define nocall +#endif #if (!defined(__clang__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)) #define unreachable() do {} while (1) -- 2.26.2