From nobody Tue Nov 18 15:24:39 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1611085739; cv=none; d=zohomail.com; s=zohoarc; b=Z0VrJRTY6OP86W9X6fnhre5OQgLv3GOIRT//zCITY6Duv8p5v09NaLqdDJPtoS9uonBLab8rqrjIfh20t/8GWzdjyrBXN32SyR9BiDFbu/Vow1WRw9fhf7Z3S5bJaOC1L3I7GjMnvIctbMtOR/WFRcasTSCZePWhhqSaTihR9lo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611085739; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uAL2T6hL0VNfqKmXHRv2i6zPWgXaNJCsr5tm1nJ2i+w=; b=G4Dg33T+oiBREnr14nUodfAm1f4m2IOI7tvq1dTS4bWerVuCteEQCfyzvbeue51Rz/+A3UoBQ0DsFLHaP09Jn2RGtFagMphOhfjrC9LY7tIqa+GFQbNuGqthzxBE6mayin36rPrbPzC5oEx2csMkv398i6vXpoyvBGC4W5TZAgc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611085739012319.0569493159063; Tue, 19 Jan 2021 11:48:59 -0800 (PST) Received: from localhost ([::1]:40430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1wzp-0006VA-Sh for importer@patchew.org; Tue, 19 Jan 2021 14:48:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1wAX-0006iO-9F for qemu-devel@nongnu.org; Tue, 19 Jan 2021 13:55:57 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:37882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1wAS-0004NR-3l for qemu-devel@nongnu.org; Tue, 19 Jan 2021 13:55:56 -0500 Received: by mail-pl1-x62b.google.com with SMTP id be12so11048581plb.4 for ; Tue, 19 Jan 2021 10:55:48 -0800 (PST) Received: from localhost.localdomain (cpe-66-75-72-126.hawaii.res.rr.com. [66.75.72.126]) by smtp.gmail.com with ESMTPSA id b203sm3209624pfb.11.2021.01.19.10.55.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 10:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uAL2T6hL0VNfqKmXHRv2i6zPWgXaNJCsr5tm1nJ2i+w=; b=pchnoq/K+93B1yTlZ2wEDY8BSgCVpCbwkmEsTOVapxx95HA4tdATS10dHCsfOId3j5 rYLVfAYtwPIkzJ72fvVk0dzM7JTGDcWfw01SqwC+dgfDqjo0Ds/+eRi6hwQVAfyKtWYo jom3J/dinN0z1C93TVtX4I8hhEhQzrZut1OL1OsWrjsrHne7qua0neKmjIN2iunS10LN WtZX3EnkTXC5ZaA1fy7JBtZ+TiLwhP+L9o/8MiQ8yn/KajOOWFBc1wmyw3bkzVQIpHx5 8W0mLkiUsf046bBHAg6IlSxAKeMvDonvp7w6L3lTFCxs2yvrMkM7s9+utD95vgkV2Std saqw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=uAL2T6hL0VNfqKmXHRv2i6zPWgXaNJCsr5tm1nJ2i+w=; b=MhOf6N2eLK09onlgdV2D12Eqow4bpMBnQwc7rUcL+HCL/Oagd+ae1YoDmxm0VvdDP5 swOjtvh0DYNK6EP9N5su7CNZ7qYgbb/EZEyAnI4oPqV+uXQI7jLkptbIW/LDTZxBgWqB cW7GNLhpIOUpxhznY9E7W9EIEjTB1nbEpD/qjNHVLwPWZo9HKgUFUZsEwUGnuzKoFJly bY1i7EsLkzbrxyfJmCy+dVlmA6u3jemKjMFtVD3AXe/srnhETbMcCsp1iPK1DgfE0iMw FOy1GblZSn0ZXMfId/Mgyc8ZT0Sts3daxcDxhXeoAD4HZXoC9e0dGi4S10i/OaMOLjkQ UdRA== X-Gm-Message-State: AOAM531/HLR+l6QgKfmrBA5Job9uBUge3V4t/Zs6WdR7bVihTwMoPWep V9dGdRc8Wb/USNATc/IJ8DAEazZqSNA4IA== X-Google-Smtp-Source: ABdhPJzQYCYgRIETZV0ZINFUmaoeS4NmuToQ7kd06vpvobDXW1ZqPge7hi9yBH/Vj2a+0OZ9yg5ucA== X-Received: by 2002:a17:90a:4490:: with SMTP id t16mr1201415pjg.55.1611082547012; Tue, 19 Jan 2021 10:55:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 1/2] qemu/compiler: Split out qemu_build_not_reached_always Date: Tue, 19 Jan 2021 08:55:41 -1000 Message-Id: <20210119185542.628456-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210119185542.628456-1-richard.henderson@linaro.org> References: <20210119185542.628456-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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: david@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Provide a symbol that can always be used to signal an error, regardless of optimization. Usage of this should be protected by e.g. __builtin_constant_p, which guards for optimization. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/qemu/compiler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index d620a841e4..cf28bb2bcd 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -215,9 +215,10 @@ * supports QEMU_ERROR, this will be reported at compile time; otherwise * this will be reported at link time due to the missing symbol. */ -#if defined(__OPTIMIZE__) && !defined(__NO_INLINE__) extern void QEMU_NORETURN QEMU_ERROR("code path is reachable") - qemu_build_not_reached(void); + qemu_build_not_reached_always(void); +#if defined(__OPTIMIZE__) && !defined(__NO_INLINE__) +#define qemu_build_not_reached() qemu_build_not_reached_always() #else #define qemu_build_not_reached() g_assert_not_reached() #endif --=20 2.25.1