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 BFC4F460F3; Thu, 23 Jan 2025 09:09:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3BE340279; Thu, 23 Jan 2025 09:09:09 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 8076F40269 for ; Thu, 23 Jan 2025 09:09:08 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 4F54220904; Thu, 23 Jan 2025 09:09:08 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [PATCH v16 2/3] drivers/common: add diagnostics macros to make code portable MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Thu, 23 Jan 2025 09:09:07 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F9DE@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <1737498970-4631-3-git-send-email-andremue@linux.microsoft.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v16 2/3] drivers/common: add diagnostics macros to make code portable Thread-Index: AdtsVOqV/ZDeqZFoT8mPS+RtqAErjQBGQ6uQ References: <1735263196-2809-1-git-send-email-andremue@linux.microsoft.com> <1737498970-4631-1-git-send-email-andremue@linux.microsoft.com> <1737498970-4631-3-git-send-email-andremue@linux.microsoft.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Andre Muezerie" Cc: , , 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 > From: Andre Muezerie [mailto:andremue@linux.microsoft.com] > Sent: Tuesday, 21 January 2025 23.36 >=20 > It was a common pattern to have "GCC diagnostic ignored" pragmas > sprinkled over the code and only activate these pragmas for certain > compilers (gcc and clang). Clang supports GCC's pragma for > compatibility with existing source code, so #pragma GCC diagnostic > and #pragma clang diagnostic are synonyms for Clang > (https://clang.llvm.org/docs/UsersManual.html). >=20 > Now that effort is being made to make the code compatible with MSVC > these expressions would become more complex. It makes sense to hide > this complexity behind macros. This makes maintenance easier as these > macros are defined in a single place. As a plus the code becomes > more readable as well. >=20 > Signed-off-by: Andre Muezerie > --- Acked-by: Morten Br=F8rup