DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	dev@dpdk.org, David Christensen <drc@linux.vnet.ibm.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Matan Azrad <matan@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbo.xia@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: Re: [PATCH] avoid AltiVec keyword vector
Date: Tue, 3 May 2022 23:30:07 -0700	[thread overview]
Message-ID: <20220504063007.GA466@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <4591093.jE0xQCEvom@thomas>

On Tue, May 03, 2022 at 05:44:26PM +0200, Thomas Monjalon wrote:
> 03/05/2022 14:30, Bruce Richardson:
> > On Tue, May 03, 2022 at 02:03:21PM +0200, Thomas Monjalon wrote:
> > > The keyword "vector" may conflict easily.
> > > As a rule, it is better to use the alternative keyword "__vector".
> 
> I forgot to say that we should #undef vector.
> 
> > hi Thomas,
> > 
> > could you perhaps clarify a bit more in the log, I'm not aware of it being
> > a keyword generally.
> 
> https://www.ibm.com/docs/fr/xl-c-and-cpp-linux/latest?topic=support-vector-types
> 
> > What would "vector" conflict with?
> > If it's a keyword is it possible to use it as a variable name in these files?
> 
> It conflicts with anything named as "vector"
> if you include AltiVec header file.
> It is especially a problem when using C++ vector type,
> that's why the keyword vector is not defined with C++:
> https://github.com/gcc-mirror/gcc/blob/master/gcc/config/rs6000/altivec.h#L45
> 
> The workaround is to #undef vector after including altivec.h,
> or directly in rte_altivec.h (with a compatibility breakage).
> In any case we should use only __vector keyword to allow such #undef.
> 

+1 please use __vector it is appropriate and the namespace defined for
the implementation. we should make as much effort as possible to avoid
contamination of the application namespace.

  reply	other threads:[~2022-05-04  6:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 12:03 Thomas Monjalon
2022-05-03 12:30 ` Bruce Richardson
2022-05-03 15:44   ` Thomas Monjalon
2022-05-04  6:30     ` Tyler Retzlaff [this message]
2022-05-04 20:40 ` David Christensen
2022-05-25  8: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=20220504063007.GA466@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=drc@linux.vnet.ibm.com \
    --cc=matan@nvidia.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=vladimir.medvedkin@intel.com \
    /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).