From patchwork Tue Nov 28 17:47:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 13471473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E8416C4167B for ; Tue, 28 Nov 2023 17:47:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.643411.1003599 (Exim 4.92) (envelope-from ) id 1r82BP-0000F3-Gz; Tue, 28 Nov 2023 17:47:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 643411.1003599; Tue, 28 Nov 2023 17:47:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r82BP-0000Ew-EL; Tue, 28 Nov 2023 17:47:39 +0000 Received: by outflank-mailman (input) for mailman id 643411; Tue, 28 Nov 2023 17:47:38 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r82BN-0000Eq-Vi for xen-devel@lists.xenproject.org; Tue, 28 Nov 2023 17:47:38 +0000 Received: from galois.linutronix.de (galois.linutronix.de [193.142.43.55]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 376fcf8c-8e16-11ee-98e3-6d05b1d4d9a1; Tue, 28 Nov 2023 18:47:36 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 376fcf8c-8e16-11ee-98e3-6d05b1d4d9a1 From: Alexander Kanavin DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701193655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6Dj6Dm0GUWm0oD+U33Q4aBpJzv9FVypp509lLyxq/40=; b=2fXB/nz7aYwbqNRddJ08Ts0Qevd0r93/MDQfUXaAL1pmbow0jv2oLvjeaAXnXTEhWjPHj2 58ZmdDR2Gj/ugcE+ChCaDwmxpa9dqUK6x2BFZVfl4jfyuRjMwrqvE4HUbXNvw8o/6kNubo f5Q4iqMJkZJUAwxDml9+UFyl+GhUhZNLRT3SgfcMhDEZweaJkGeiD1wDcqqQsAbzBkJOJq 2qcoJarGpw29sAO8ZQ8XaQpyDAlIKc26F5a2dW7OWMtebZch1fx42n3d4Q1IBca3yP4OXS Umpn4EpnxJ/t06st5/csURDoDG9feEyvcVHvcGqOlf4sUnKdN2q2FmYtK7sJjw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701193656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6Dj6Dm0GUWm0oD+U33Q4aBpJzv9FVypp509lLyxq/40=; b=ADeq3y6n6pKlMHe1V1yK+6nRMXVIotW04wwV+hbKFuvP1f9IEHqNMt4Zvg+FZqmUSg7RO0 Wl+c3UZtzfy6EBBQ== To: xen-devel@lists.xenproject.org Cc: Alexander Kanavin , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH] Config.mk: drop -Wdeclaration-after-statement Date: Tue, 28 Nov 2023 18:47:29 +0100 Message-Id: <20231128174729.3880113-1-alex@linutronix.de> MIME-Version: 1.0 Such constructs are fully allowed by C99: https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Mixed-Labels-and-Declarations.html#Mixed-Labels-and-Declarations If the flag is present, then building against python 3.12 will fail thusly: | In file included from /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/Python.h:44, | from xen/lowlevel/xc/xc.c:8: | /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/object.h: In function 'Py_SIZE': | /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/object.h:233:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] | 233 | PyVarObject *var_ob = _PyVarObject_CAST(ob); | | ^~~~~~~~~~~ | In file included from /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/Python.h:53: | /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/cpython/longintrepr.h: In function '_PyLong_CompactValue': | /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/cpython/longintrepr.h:121:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] | 121 | Py_ssize_t sign = 1 - (op->long_value.lv_tag & _PyLong_SIGN_MASK); | | ^~~~~~~~~~ | cc1: all warnings being treated as errors Signed-off-by: Alexander Kanavin --- Config.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/Config.mk b/Config.mk index 2c43702958..7e67b91de2 100644 --- a/Config.mk +++ b/Config.mk @@ -177,8 +177,6 @@ CFLAGS += -std=gnu99 CFLAGS += -Wall -Wstrict-prototypes -$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) -$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable) $(call cc-option-add,CFLAGS,CC,-Wno-unused-local-typedefs)