From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2419145D78; Fri, 22 Nov 2024 01:50:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B497A4026E; Fri, 22 Nov 2024 01:50:07 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 0E3F54026A for ; Fri, 22 Nov 2024 01:50:06 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Xvbwh2nttz1JCn1; Fri, 22 Nov 2024 08:45:08 +0800 (CST) Received: from kwepemk500009.china.huawei.com (unknown [7.202.194.94]) by mail.maildlp.com (Postfix) with ESMTPS id 6CAB31A0188; Fri, 22 Nov 2024 08:50:01 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 22 Nov 2024 08:50:00 +0800 Message-ID: Date: Fri, 22 Nov 2024 08:50:00 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v12 18/21] build: enable vla warnings on Windows built code To: Andre Muezerie , CC: Tyler Retzlaff References: <1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com> <1732225298-10322-1-git-send-email-andremue@linux.microsoft.com> <1732225298-10322-19-git-send-email-andremue@linux.microsoft.com> Content-Language: en-US From: fengchengwen In-Reply-To: <1732225298-10322-19-git-send-email-andremue@linux.microsoft.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemk500009.china.huawei.com (7.202.194.94) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Chengwen Feng On 2024/11/22 5:41, Andre Muezerie wrote: > From: Tyler Retzlaff > > MSVC does not support optional C11 VLAs. When building for Windows > enable -Wvla so that mingw and clang also fail if a VLA is used. > > Signed-off-by: Tyler Retzlaff > Acked-by: Bruce Richardson > --- > config/meson.build | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/config/meson.build b/config/meson.build > index 6aaad6d8a4..ebca19b4e5 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -342,6 +342,10 @@ if cc.get_id() == 'intel' > warning_flags += '-diag-disable=@0@'.format(i) > endforeach > endif > +# no VLAs in code built on Windows > +if is_windows > + warning_flags += '-Wvla' > +endif > foreach arg: warning_flags > if cc.has_argument(arg) > add_project_arguments(arg, language: 'c')