From patchwork Thu Jun 17 09:31:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 462133 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp278346jae; Thu, 17 Jun 2021 02:52:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTHNLDQEToyAsFU46/+l6pT/b+95QY0WLhZZIzaZMw5lBIZoJGOka12bKZD5TcDfofioEM X-Received: by 2002:a05:6214:f22:: with SMTP id iw2mr4975549qvb.27.1623923557117; Thu, 17 Jun 2021 02:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623923557; cv=none; d=google.com; s=arc-20160816; b=MVsAR/k0Bpl4Y53bvrWtTtALvGNZs2Bd2BkHZ8R/rmao33tRArmYVvAMdnBdjmDtMw ysWWzmy1l8+L93gNvwVZLeoGaGWOQYa1TVKcBpxLF7SGO8NyxsUW9PyQ2YPe+a0YECsM zZzywrMO5cV8tyeuUfks1xGoFaSoD4wV72YOODL+PMFNuifDd+fPzYlUHmI9ZYUgI2iQ zWMF6qTea9cQYJ0egz4SzD/6m5ZQhLEnQXvCgZxhkJN8OVyQ1s1BD2Mpb0aEDjtiiDcF lte8OUxRZx+2nSHXyfXZDAxV6N7a7OUb2Tp7tZYtN38Z+STA3ayBYMJJJLvY9JHKeAVw pi2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Ih1xddWmyW9WnFhSZ9eRiE6DF/hMjeq/MCb4afEYuBY=; b=0BFGvlRY5tl5sq2XgefbvXw5Z454RDrKqCdymW1tNO13M6VXZPZeEhJCeSNYLkoB/P 0TygjA8GhImijFx+nr7Hskf/kKue8FxwPKTrrF+nP2lv0eOrV5yjEQXS5hlXNmSTuyzA 0XqDijU+/ofhFiApTXyNRi3y6Q4fwujSGIQLY4ddTW/cbGpui5otfMOa6jDVArPuDpPc nmnTKUZCgVr/v61exD25Yre5gJ6p7Pyz0NptWWO42ofdZAs6gRGLygudXDgQZ24ztw7r WGvVy1Wy9Dq3Sgeikp9Ald2qPhj0/ah2oTfGnkxQgLy248sHrqhqcSErAtF0sujW0aej SdEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="IK2Zaum/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s184si1999281qkc.70.2021.06.17.02.52.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Jun 2021 02:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="IK2Zaum/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:43572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltohQ-00057a-Il for patch@linaro.org; Thu, 17 Jun 2021 05:52:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltoNg-0003IB-Md for qemu-devel@nongnu.org; Thu, 17 Jun 2021 05:32:12 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:44941) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltoNe-0006S6-Mo for qemu-devel@nongnu.org; Thu, 17 Jun 2021 05:32:12 -0400 Received: by mail-ej1-x633.google.com with SMTP id gt18so8690176ejc.11 for ; Thu, 17 Jun 2021 02:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ih1xddWmyW9WnFhSZ9eRiE6DF/hMjeq/MCb4afEYuBY=; b=IK2Zaum/1R3bz4w0YCSAYB1xPl3BAL3bv/jzV/qr8GZ3e4GgqE1zFA+fsl10B1hWGL tyomFaEfRxoL/69R0kBFbX2cZ7w0PMGJh7fp2Z54hiEqnsofE/ME1xDnrXrxzHkDJ8qc BcENH/nGv4RYXmLwM83vA9sGKvAi/J+/6SV96uvDT/lpnwV65rGqOlypkIrqm7oAxgG9 GNpJhDJirvH5H+mz8oR8DgqaTftGMDMzgx1d0ej4DHyUB7Puq1fTJgUYNQnAunOuHFw6 smwogOsW+8O1V6LKX/cxO21w/LdCXuYfLchIOP9noJE/3Am/um9jug/JK95boZwuklTt elpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ih1xddWmyW9WnFhSZ9eRiE6DF/hMjeq/MCb4afEYuBY=; b=nROjfuTyg6q29o7epfxzUqqAJqnGGCynl0sSjHsx+6DUFnHPf4e0fabib72/UN0Nm5 YLuPlrQSmujwVYXN9a5ljm2vlsKLKv2Y85eiWvZawKSx2xwNWe7yDecZUSBZf1mgylkM XaQpJtJ1KxfjvGUvjTH/AcAjpN8VtuzY0QvnDtOuINBElI9qx8TEDE19a5scp7MIWDJ7 kNl/KUPC6alxhs34AkL/zkEy2WS+uPNQTK+qgh9ljlSnnnTs2dfxw/nYM5a3KJtgs+Go fCghkGgK5l1wIlHB7nIK4hjiwWtYDUuNlfGmbU8OyDcb4SN4yVFejcc4FS+GdjW4T6w5 soiw== X-Gm-Message-State: AOAM531DqT3YDViZw3pjl36+rOCA0L0JKCwPErK1S0vdzGLjg8r2gqRV wNyX/4y8T4RsMK4df9ctqx1Ov2ky25U= X-Received: by 2002:a17:906:670c:: with SMTP id a12mr4118558ejp.249.1623922328333; Thu, 17 Jun 2021 02:32:08 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m18sm3328140ejx.56.2021.06.17.02.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 02:32:08 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 45/45] configure: Remove probe for _Static_assert Date: Thu, 17 Jun 2021 11:31:34 +0200 Message-Id: <20210617093134.900014-46-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210617093134.900014-1-pbonzini@redhat.com> References: <20210617093134.900014-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson _Static_assert is part of C11, which is now required. Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id: <20210614233143.1221879-9-richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini --- configure | 18 ------------------ include/qemu/compiler.h | 11 ----------- 2 files changed, 29 deletions(-) -- 2.31.1 diff --git a/configure b/configure index ebc016111a..262ab71802 100755 --- a/configure +++ b/configure @@ -5090,20 +5090,6 @@ if compile_prog "" "" ; then have_sysmacros=yes fi -########################################## -# check for _Static_assert() - -have_static_assert=no -cat > $TMPC << EOF -_Static_assert(1, "success"); -int main(void) { - return 0; -} -EOF -if compile_prog "" "" ; then - have_static_assert=yes -fi - ########################################## # check for utmpx.h, it is missing e.g. on OpenBSD @@ -6035,10 +6021,6 @@ if test "$have_sysmacros" = "yes" ; then echo "CONFIG_SYSMACROS=y" >> $config_host_mak fi -if test "$have_static_assert" = "yes" ; then - echo "CONFIG_STATIC_ASSERT=y" >> $config_host_mak -fi - if test "$have_utmpx" = "yes" ; then echo "HAVE_UTMPX=y" >> $config_host_mak fi diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 5766d61589..3baa5e3790 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -72,18 +72,7 @@ int:(x) ? -1 : 1; \ } -/* QEMU_BUILD_BUG_MSG() emits the message given if _Static_assert is - * supported; otherwise, it will be omitted from the compiler error - * message (but as it remains present in the source code, it can still - * be useful when debugging). */ -#if defined(CONFIG_STATIC_ASSERT) #define QEMU_BUILD_BUG_MSG(x, msg) _Static_assert(!(x), msg) -#elif defined(__COUNTER__) -#define QEMU_BUILD_BUG_MSG(x, msg) typedef QEMU_BUILD_BUG_ON_STRUCT(x) \ - glue(qemu_build_bug_on__, __COUNTER__) __attribute__((unused)) -#else -#define QEMU_BUILD_BUG_MSG(x, msg) -#endif #define QEMU_BUILD_BUG_ON(x) QEMU_BUILD_BUG_MSG(x, "not expecting: " #x)