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 AED6B45FD9; Fri, 3 Jan 2025 20:24:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76E13402DC; Fri, 3 Jan 2025 20:24:06 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 6FE4E402B1 for ; Fri, 3 Jan 2025 20:24:05 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2161eb95317so180789995ad.1 for ; Fri, 03 Jan 2025 11:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1735932244; x=1736537044; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=igQjN+YhdAjzmeD+e7SBPa3N8T6koFEw8bbHpUD7kCU=; b=BEEkccUviTTpTNVbjBJpGVI59KnGZ/dQSgNU20najWpK31ki3m5atDCaO6pCdE9hkP JpRxpYt+sYYVV+JofOm7FuCeTqk9xe4oHkplO3EcLvL4A0PCLT0+zEVfdC5IQQTcaWMv Hx0tq4x3ucpF7MHN9bewuyoul7JQYDPavp6mhwSRVP9r46zEvF8wBteWhlCOCjmNnEAW ynRhNRo4IEy7QdGkDB5RIOK0kNXhDPQpO1yIYU95OfBD+qyG0vwHklidW0ZNdSv1/y9q 0cEb3PvIKJLYICVjZyD8hvxLDbLSXUl/zqHwdOUXt3QLo5D2fCk6KIlYtzpGTl3WOz1v CH5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735932244; x=1736537044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=igQjN+YhdAjzmeD+e7SBPa3N8T6koFEw8bbHpUD7kCU=; b=CajwDg5wunYuzSq2uMqeC826hDvOKmK0iXrgcTAekSReZWuvEja7mboiiNJmPlN7LN U6CwFGRfRAdcD7CEECCQ8a0byb0iglVWsSUPChfchHBUiXcEseXueYyesnG8xdOnkWzF fWkFTfchrohgFSdqCjzPGE7DFUjcIml8E6fo05PbJ5hg4cGTYkMcT/MAv9938qqIvSa8 1tpteaBi1isitsbI2J3yknA61IVL4wBQQ7n1IMxon0EnhMnrPgyvhj4Ljr4yR7piECfO eXsXwjiT5adrgDp1XltkJf9vaorJRPhSyJDcdVi/f49MHGFlwadv1Y6Iw7srU8rRhSBN bQPg== X-Gm-Message-State: AOJu0Yzby+UIs8BvZVww21BOfhLn0DR/CEvnsC6jjyaS/A0lAbjCdC4M udAkx74AjJzT0Ww28E4sqi3I6QSV9ialdfw5azSDuSsTVJMKW6+QU36eYvBN6MovOfh6aObppQO mIsU= X-Gm-Gg: ASbGncv+NZ5gB/angdkXYMe2g572gkm85f+Zvvs1tcT2jZ2YdK3xsRaRWmK4KIbV8IZ ijrhvGeYBbzWpjf8nX+e/BGM0+jknQJf5p1BfW0gkzjfVEtjhPIiWyEX01xWhjgHm91gaKF3mvN Oq9XcKF1Bv6zKrxDeyu+hbroMJIl4SOlpYwd8/uRz+PeSEXhif4q69JcYpMXM1/ag0Uj3stw8zv sprKl04U13PrIYfKSEf449NJ+XdLd29RhQNmHfqwfCZJTSwQ2cL1NGdJxVCuuQ/tSgHwKhv4gdL bSOb4SEM X-Google-Smtp-Source: AGHT+IFh7zeaKAoloNNX2ZSmnNaplRU3HMDd02KeRGTrTB5uMx5RMvILJryqGoL6INZIko5g/2TMlQ== X-Received: by 2002:a17:903:120e:b0:215:a179:14d2 with SMTP id d9443c01a7336-219e6f27fc3mr642955545ad.50.1735932244627; Fri, 03 Jan 2025 11:24:04 -0800 (PST) Received: from pi5 (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f692fsm248626245ad.216.2025.01.03.11.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2025 11:24:04 -0800 (PST) Date: Fri, 3 Jan 2025 11:24:02 -0800 From: Stephen Hemminger To: Andre Muezerie Cc: dev@dpdk.org Subject: Re: [PATCH v11 0/3] add diagnostics macros to make code portable Message-ID: <20250103112402.64bf2d96@pi5> In-Reply-To: <1735918611-17374-1-git-send-email-andremue@linux.microsoft.com> References: <1735263196-2809-1-git-send-email-andremue@linux.microsoft.com> <1735918611-17374-1-git-send-email-andremue@linux.microsoft.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 3 Jan 2025 07:36:48 -0800 Andre Muezerie wrote: > From: Andre Muezerie > To: andremue@linux.microsoft.com > Cc: dev@dpdk.org, stephen@networkplumber.org > Subject: [PATCH v11 0/3] add diagnostics macros to make code portable > Date: Fri, 3 Jan 2025 07:36:48 -0800 > X-Mailer: git-send-email 1.8.3.1 > > 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). > > 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. Since 90% of these cases are about removing const from a pointer, maybe it would be better to have a macro that did that? Would not work for base driver code which is pretending to be platform independent.