DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, dmitry.kozliuk@gmail.com,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH] devtools: forbid additions of __reserved
Date: Wed, 10 Nov 2021 21:45:16 -0800	[thread overview]
Message-ID: <20211111054516.GB31795@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <20211023102900.22317-1-david.marchand@redhat.com>

On Sat, Oct 23, 2021 at 12:29:00PM +0200, David Marchand wrote:
> __reserved is a reserved keyword in Windows system headers.
> 

fwiw it's the c standard that stipulates identifiers starting with __
are reserved for any use.

C11/C99 "ANSI-C"
7.1.3 Reserved Identifiers
    `All identifiers that begin with an underscore and either an
    uppercase letter or another underscore are always reserved for
    any use.'

Public DPDK headers are also subject to the C++ standard.
C++ (n3690)
5.10 Identifiers

    `(3.1) -- Each identifier that contains a double underscore __ or
    begins with an underscore followed by an uppercase letter is reserved
    to the implementation for any use.'

    `(3.2) -- Each identifier that begins with an underscore is reserved
    to the implementation for use as a name in the global namespace.'

dpdk is pretty comprehensive in violating these clauses with
identifiers of the form `__rte_’ fortunately since preprocessors,
compilers, standard library headers are unlikely to use `rte’ it’s
fairly safe in spite of being non-compliant.


  parent reply	other threads:[~2021-11-11  5:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23 10:29 David Marchand
2021-10-27 10:00 ` Bruce Richardson
2021-10-28 13:27 ` Walsh, Conor
2021-11-11  5:45 ` Tyler Retzlaff [this message]
2021-11-26 17:18 ` Thomas Monjalon

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=20211111054516.GB31795@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=thomas@monjalon.net \
    /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).