DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Andre Muezerie <andremue@linux.microsoft.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v11 0/3] add diagnostics macros to make code portable
Date: Fri, 3 Jan 2025 11:24:02 -0800	[thread overview]
Message-ID: <20250103112402.64bf2d96@pi5> (raw)
In-Reply-To: <1735918611-17374-1-git-send-email-andremue@linux.microsoft.com>

On Fri,  3 Jan 2025 07:36:48 -0800
Andre Muezerie <andremue@linux.microsoft.com> wrote:

> From: Andre Muezerie <andremue@linux.microsoft.com>
> 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.

  parent reply	other threads:[~2025-01-03 19:24 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-27  1:33 [PATCH " Andre Muezerie
2024-12-27  1:33 ` [PATCH 1/3] lib/eal: " Andre Muezerie
2024-12-27  1:33 ` [PATCH 2/3] drivers/common: " Andre Muezerie
2024-12-27 17:57   ` Stephen Hemminger
2024-12-27 19:43     ` Andre Muezerie
2024-12-27  1:33 ` [PATCH 3/3] drivers/net: " Andre Muezerie
2024-12-28  0:45 ` [PATCH v2 0/3] " Andre Muezerie
2024-12-28  0:45   ` [PATCH v2 1/3] lib/eal: " Andre Muezerie
2024-12-28  0:45   ` [PATCH v2 2/3] drivers/common: " Andre Muezerie
2024-12-28  0:45   ` [PATCH v2 3/3] drivers/net: " Andre Muezerie
2024-12-28  3:18 ` [PATCH v3 0/3] " Andre Muezerie
2024-12-28  3:18   ` [PATCH v3 1/3] lib/eal: " Andre Muezerie
2024-12-28  3:18   ` [PATCH v3 2/3] drivers/common: " Andre Muezerie
2024-12-28  3:18   ` [PATCH v3 3/3] drivers/net: " Andre Muezerie
2024-12-30 15:59 ` [PATCH v4 0/3] " Andre Muezerie
2024-12-30 15:59   ` [PATCH v4 1/3] lib/eal: " Andre Muezerie
2024-12-30 15:59   ` [PATCH v4 2/3] drivers/common: " Andre Muezerie
2024-12-30 15:59   ` [PATCH v4 3/3] drivers/net: " Andre Muezerie
2024-12-30 17:44   ` [PATCH v4 0/3] " Stephen Hemminger
2024-12-31 18:55 ` [PATCH v5 " Andre Muezerie
2024-12-31 18:55   ` [PATCH v5 1/3] lib/eal: " Andre Muezerie
2024-12-31 18:55   ` [PATCH v5 2/3] drivers/common: " Andre Muezerie
2024-12-31 18:55   ` [PATCH v5 3/3] drivers/net: " Andre Muezerie
2024-12-31 20:15 ` [PATCH v6 0/3] " Andre Muezerie
2024-12-31 20:15   ` [PATCH v6 1/3] lib/eal: " Andre Muezerie
2024-12-31 20:15   ` [PATCH v6 2/3] drivers/common: " Andre Muezerie
2024-12-31 20:15   ` [PATCH v6 3/3] drivers/net: " Andre Muezerie
2024-12-31 22:30 ` [PATCH v7 0/3] " Andre Muezerie
2024-12-31 22:30   ` [PATCH v7 1/3] lib/eal: " Andre Muezerie
2024-12-31 22:30   ` [PATCH v7 2/3] drivers/common: " Andre Muezerie
2024-12-31 22:30   ` [PATCH v7 3/3] drivers/net: " Andre Muezerie
2025-01-01  0:48 ` [PATCH v8 0/3] " Andre Muezerie
2025-01-01  0:48   ` [PATCH v8 1/3] lib/eal: " Andre Muezerie
2025-01-01  0:48   ` [PATCH v8 2/3] drivers/common: " Andre Muezerie
2025-01-01  0:48   ` [PATCH v8 3/3] drivers/net: " Andre Muezerie
2025-01-01  3:36 ` [PATCH v9 0/3] " Andre Muezerie
2025-01-01  3:36   ` [PATCH v9 1/3] lib/eal: " Andre Muezerie
2025-01-01  3:36   ` [PATCH v9 2/3] drivers/common: " Andre Muezerie
2025-01-01  3:36   ` [PATCH v9 3/3] drivers/net: " Andre Muezerie
2025-01-03  0:12 ` [PATCH v10 0/3] " Andre Muezerie
2025-01-03  0:12   ` [PATCH v10 1/3] lib/eal: " Andre Muezerie
2025-01-03  0:12   ` [PATCH v10 2/3] drivers/common: " Andre Muezerie
2025-01-03  0:12   ` [PATCH v10 3/3] drivers/net: " Andre Muezerie
2025-01-03 15:36 ` [PATCH v11 0/3] " Andre Muezerie
2025-01-03 15:36   ` [PATCH v11 1/3] lib/eal: " Andre Muezerie
2025-01-03 15:36   ` [PATCH v11 2/3] drivers/common: " Andre Muezerie
2025-01-03 15:36   ` [PATCH v11 3/3] drivers/net: " Andre Muezerie
2025-01-03 19:24   ` Stephen Hemminger [this message]
2025-01-03 21:26     ` [PATCH v11 0/3] " Andre Muezerie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250103112402.64bf2d96@pi5 \
    --to=stephen@networkplumber.org \
    --cc=andremue@linux.microsoft.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).