All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: 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, 03 May 2022 17:44:26 +0200	[thread overview]
Message-ID: <4591093.jE0xQCEvom@thomas> (raw)
In-Reply-To: <YnEgUSJ77f7+RR4u@bricha3-MOBL.ger.corp.intel.com>

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.



  reply	other threads:[~2022-05-03 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 12:03 [PATCH] avoid AltiVec keyword vector Thomas Monjalon
2022-05-03 12:30 ` Bruce Richardson
2022-05-03 15:44   ` Thomas Monjalon [this message]
2022-05-04  6:30     ` Tyler Retzlaff
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=4591093.jE0xQCEvom@thomas \
    --to=thomas@monjalon.net \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.