From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YSOr+rBL; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 255E25A0262 for ; Sun, 19 Jul 2026 19:49:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784483392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DMQvGOPdKQD3X4GHl+56zLOPRPzYF781t/8sCLLWn9E=; b=YSOr+rBLzuYfhGqywAMQU5yMH379OwoA5zLAvCeS31F6JHSspnweHx7BqkF8FEvk4JPPgt WoGLiUacqzPcQtaPSdxWJiOhyHeq5YmqY25S5DAoMcsxFexVtBGwJybcL7iEOzwpnHJKAA PD/dZLDZmNnfKEbwFkGgK0ptO2f6oA0= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-286-SkyfNUmQMOeud_BRN0anBw-1; Sun, 19 Jul 2026 13:49:50 -0400 X-MC-Unique: SkyfNUmQMOeud_BRN0anBw-1 X-Mimecast-MFC-AGG-ID: SkyfNUmQMOeud_BRN0anBw_1784483389 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-493bfc3b84aso48244755e9.0 for ; Sun, 19 Jul 2026 10:49:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784483389; x=1785088189; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=DMQvGOPdKQD3X4GHl+56zLOPRPzYF781t/8sCLLWn9E=; b=Z/DTQSHuwUp5swKSVt2p2+Xocr9eo2mGyknT/G2Vf0yoKYOAoHWOi4YhZFikBN47Dp 6lTcJkPcE97DP3Qhi7o6dBaYLrIVNhOSm6v0Y4oPP2uOsmC1aK1an+zaKwWZeKkEt2e0 hw/6Sbvh3FSrS4nOAAroWO13YNOgchKgYJX0Gf9ClkfmjhA+gm6kLx4akBswz+3vFgQO B5gko2jT2QTVratd0GTNLUCGvPy2fj5TqIdqMBsa6b0TDZJLiaX6ZcP85r0cl2Po0q8R XuKSJWECpA+lA/i/9cmNrznw+OiAVi8Ucad6YhsJskC4RbXXKn24/JdHENZYIQJLKmfS vngQ== X-Gm-Message-State: AOJu0YyK7/Ayv+tjDi4U03GCEQPDdwnI2GPPQfdB32Ja8wRVr/Eqdx4L tJreRzRnT3BX5rru0fpy3NIxfcb9c7sFtSKFvp/Ul8Bt75PHPg1EKpHcPAaznAPM13SxdTWBD6i 8jG1sUX+R5juMXK+REQVQXul2ZozTHlo8u8xwtdeDoZx5ikxQim/Af1f9KB2pBw== X-Gm-Gg: AfdE7cnLeop1HFhgsLFt2+U47iz3q6nZd1DWTREAeqigaWbTOuFfK30W/4n7xcU2cFe RfI3shbDPhE3m2HECBRhsjiEDo5Tr5almVTNeNR46hnHZQSf5puqXGUmPreRgSGqJ0MnORGLjn8 lJPfMRyEnLjC4L9yjn9IHQlq76Vm9laPvY1vK0Z9EDeSZbkNqEadN8JH95mi41k/+YTr+4ZDkH9 9ptJeZaVNNXSbFqyKQsytninhnNvomj3GSOo4yp+1ZvUO0ZSrPWYqIBdT3qr9iY8lczGyEiudaz SAlQZZF0LZwyLQGcrtSSCZStnxiINLNMxTAIQKyit931hLi//3mw2tieSKjqMco37Nz1aRM0t+B 8OV6t33JwcUr57Rd4y+4Fe/mGXG4G X-Received: by 2002:a05:600c:524c:b0:495:4e17:cad5 with SMTP id 5b1f17b1804b1-4954e17caeemr104009365e9.26.1784483389284; Sun, 19 Jul 2026 10:49:49 -0700 (PDT) X-Received: by 2002:a05:600c:524c:b0:495:4e17:cad5 with SMTP id 5b1f17b1804b1-4954e17caeemr104008995e9.26.1784483388762; Sun, 19 Jul 2026 10:49:48 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49549a47de7sm220976485e9.7.2026.07.19.10.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2026 10:49:48 -0700 (PDT) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] pif: Add message to static_assert for C11 compliance, fix build with gcc 8 Message-ID: <20260719194947.5baacb55@elisabeth> In-Reply-To: References: <20260718074134.1330908-1-sbrivio@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Sun, 19 Jul 2026 19:49:47 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: OPhTAdxBSU3dhimRMqXXbLiXvidk3JvKZ3LKCqwi7y4_1784483389 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: O7LVLUIBL2NTORLVJFCGNUQXOEFDXJRL X-Message-ID-Hash: O7LVLUIBL2NTORLVJFCGNUQXOEFDXJRL X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Sun, 19 Jul 2026 14:05:27 +1000 David Gibson wrote: > On Sat, Jul 18, 2026 at 09:41:34AM +0200, Stefano Brivio wrote: > > Seen with gcc 8.5: > > > > --- > > In file included from passt.h:18, > > from qrap.c:36: > > pif.h: In function 'pif_type': > > pif.h:48:44: error: expected ',' before ')' token > > static_assert(sizeof("?") <= PIF_NAME_SIZE); > > ^ > > make: *** [Makefile:105: qrap] Error 1 > > --- > > > > As noted in ba84a3b17af8 ("treewide: Add messages to static_assert() > > calls"), static_assert() calls need a message to comply with C11. The > > form without message is supported starting from C23 only. > > > > Fixes: cbcd4284111f ("pif: Limit pif names to 128 bytes") > > Signed-off-by: Stefano Brivio > > Huh. Weird I didn't get a warning for this one, I've caught this same > mistake a bunch of times before because of a warning, though I forget > if it came from the compiler or one of the static checkers. Same here, I didn't get a warning either, but in ba84a3b17af8 you mentioned clang-tidy reporting warnings only in some cases, so I guess that's the kind of warning you would have expected. -- Stefano