From patchwork Fri Jun 11 23:33:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 458523 Delivered-To: patch@linaro.org Received: by 2002:a17:907:7409:0:0:0:0 with SMTP id gj9csp700172ejc; Fri, 11 Jun 2021 16:35:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXzOJMtqKHC1v6t5YTzVisw9MLOPuKvCdovIBbH4uyRcJcNLEiE0ppM0kCxBsjebgHYUwb X-Received: by 2002:a0c:eda5:: with SMTP id h5mr7305537qvr.26.1623454523335; Fri, 11 Jun 2021 16:35:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623454523; cv=none; d=google.com; s=arc-20160816; b=Fx0Bq69r6dLqSH03C8yoCfv5sJJnChjSWW32dTQOe+JHm9gbLIzYrFvBEe1gfawI5F CHSVfdsgXQXJdeTQZ1WUlYVjtvkCF8+KgRrKlKtzQ92WNxOcX23T+Vi3ObvbW/yZRCyh bsLzAFY2R6yQHR/xBlsdugYHmJhuV4KIN7B5HUn1xvNEsk2cFTC1fnEJUHcCTHZrz83H +yNSs3MgTldXg37FSHSRStfEG8fmxB3DEk0AsyF/ne7hdodKDr8fwPztgAmYdBhRobY5 9NBAXoaiJTFVxoMw5s0vqCxleY515032qp/Vdf6NA4GwvYTnULx/knRC2cL7q3YOxhzc 5qDQ== 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:message-id:date:subject:to:from:dkim-signature; bh=Su2+lNrIYiIwUqosKkObvIfBLeTcjXELFCaL6bYLt4g=; b=MFVOWzUVD2dMN+EY5zLs/KgLwcOXbbkYnga5X7D89X+cxyGj33L/t8oI6l43oOwLZ8 cMttksJWOA8f4Ip7hYsMohYBAxoJBqFUE3rrJpiO+C+OBqj1ztJISOkkuMR7bpE4kqdc AQmmwzaVRAPS2Jm4YQFf33DAlkQ7sbcu5OYZONDI1jJFlaSGTWDX20C6vn4ANwWDM77g PjLJ4fHE2gsaTJh4QHCuNxth3Qdx/OLYYVZjpIf4IzqCEubSR+uDAPndNh4OK0EijjCC RupqX/jfrY0Uz0GhWOQLI6n5ZfS+5o9Ul7Phaj9GElMnc8ZTu7X+ThHVR5mHleJX3WtV 8Qbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=c77Ucsjq; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c7si4798667qko.164.2021.06.11.16.35.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jun 2021 16:35:23 -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=@linaro.org header.s=google header.b=c77Ucsjq; 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=linaro.org Received: from localhost ([::1]:54826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrqgM-0004HU-4o for patch@linaro.org; Fri, 11 Jun 2021 19:35:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrqet-0004HA-LP for qemu-devel@nongnu.org; Fri, 11 Jun 2021 19:33:52 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:40652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrqes-0006NB-01 for qemu-devel@nongnu.org; Fri, 11 Jun 2021 19:33:51 -0400 Received: by mail-pf1-x42e.google.com with SMTP id q25so5680941pfh.7 for ; Fri, 11 Jun 2021 16:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Su2+lNrIYiIwUqosKkObvIfBLeTcjXELFCaL6bYLt4g=; b=c77UcsjqfLycJKXeg9Yex4heanTKKzv1tTeNjRoWdHFSu8zQd3dv+0HhZ2uaWvMkjC Kgq4xfECVP+dtqwgp2uVaysVRjox6swnGAyaI7yZDU+CLMYhSsFFimXWGX0abj98o7MT m9HDy+552opbkGJy3bRRGHw9/SnZ62NzYkQD7i3oHcXwXz9VCQ9MXYTP51PluV8qRHii dJthkRPXXq1c9bt0bXR5SkL9INv5jsOfduB8LMGFoDnwqioHDRMqxRalPSH5E/gT+8OO tgiNYFuPV0LZA/XuToMqS3fmY2bzFSTOwrcgTw3YP9L94Q1uJr9LaN/P7VaBPsJU+/8S VuPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Su2+lNrIYiIwUqosKkObvIfBLeTcjXELFCaL6bYLt4g=; b=t8cntkn9Tn4HVjRuqMH0waE/EBIj7eYkcgEPrJdA+h8Iej1xYaqwMoh15SvqA1BlFr FyiM/xuUWqVma5/rHw9+oH7mRfDtEXVtektkERYSfzKF7dQbYWC15ZYeIzhCzZkpnN7b SA44B9ps1a2MZtEeKwKMvzqrKpJFuTxFZ4lIhr2JA+7XbgrjJMnQRXMPxtlDnrsYNv+Z yDf0tRUhN4ba+SOZUZYXbP7GjAQDbL0zlL60e3DD74Sj5cLFhwhsImM49/RqdyhPmo/T uAq+1WYIDnlHjdxs/atkkor4Roi3vokVFnx581akeNi/Zq75jWdBFizw8WhYHBTnU6RC jD7w== X-Gm-Message-State: AOAM533ghYbSCj1sTSl6axGOCCdewg+MYndu+myAjCfFeSe5BR8k5NYJ xgwdtbxGA3jMTr2gv/DvIGiKATdWW/MZCQ== X-Received: by 2002:a63:1d18:: with SMTP id d24mr5793528pgd.355.1623454428156; Fri, 11 Jun 2021 16:33:48 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id m134sm6349606pfd.148.2021.06.11.16.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 16:33:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 0/8] configure: Change to -std=gnu11 Date: Fri, 11 Jun 2021 16:33:39 -0700 Message-Id: <20210611233347.653129-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: pbonzini@redhat.com, thuth@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now that we assume gcc 7.5 as a minimum, we have the option of changing to a newer C standard. The two major ones that I think apply are _Generic and _Static_assert. While Paolo created a remarkably functional replacement for _Generic using builtins, the error messages that you get out of the keyword are *vastly* more intelligable, and the syntax is easier to read. While I'd like to prefer _Static_assert over QEMU_BUILD_BUG_ON going forward, and would like to convert existing uses, that is a much bigger job. Especially since the test condition is inverted. In the meantime, can drop the configure detection. r~ Richard Henderson (8): configure: Use -std=gnu11 softfloat: Use _Generic instead of QEMU_GENERIC util: Use real functions for thread-posix QemuRecMutex util: Pass file+line to qemu_rec_mutex_unlock_impl util: Use unique type for QemuRecMutex in thread-posix.h include/qemu/lockable: Use _Generic instead of QEMU_GENERIC qemu/compiler: Remove QEMU_GENERIC configure: Remove probe for _Static_assert configure | 22 +--------- meson.build | 2 +- include/qemu/compiler.h | 51 ---------------------- include/qemu/lockable.h | 85 +++++++++++++++++++------------------ include/qemu/thread-posix.h | 14 +++--- include/qemu/thread-win32.h | 6 --- include/qemu/thread.h | 15 ++++++- fpu/softfloat.c | 16 ++++--- util/qemu-thread-posix.c | 24 ++++++++++- util/qemu-thread-win32.c | 2 +- 10 files changed, 100 insertions(+), 137 deletions(-) -- 2.25.1