DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] rte_pci.h: Fix C++11 compilation
@ 2015-02-20  9:35 Stefan Puiu
  2015-02-20 11:26 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Puiu @ 2015-02-20  9:35 UTC (permalink / raw)
  To: dev

 In C++11 concatenated string literals need to have a
 space in between. Found with clang++-3.4, IIRC g++-4.8 also complains about this. 

Sample error message:
dpdk/include/rte_pci.h:96:26: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]

Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>
---
 lib/librte_eal/common/include/rte_pci.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index 66ed793..12ae5a7 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -93,10 +93,10 @@ extern struct pci_device_list pci_device_list; /**< Global list of PCI devices.
 #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
 
 /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
-#define PCI_PRI_FMT "%.4"PRIx16":%.2"PRIx8":%.2"PRIx8".%"PRIx8
+#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
 
 /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */
-#define PCI_SHORT_PRI_FMT "%.2"PRIx8":%.2"PRIx8".%"PRIx8
+#define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
 
 /** Nb. of values in PCI device identifier format string. */
 #define PCI_FMT_NVAL 4
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_pci.h: Fix C++11 compilation
  2015-02-20  9:35 [dpdk-dev] [PATCH] rte_pci.h: Fix C++11 compilation Stefan Puiu
@ 2015-02-20 11:26 ` Thomas Monjalon
  2015-02-20 12:22   ` Stefan Puiu
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2015-02-20 11:26 UTC (permalink / raw)
  To: Stefan Puiu; +Cc: dev

Hi Stefan,

Thanks for improving DPDK for C++ usage.

I'm a bit lost because that's the fourth time you send the same patch (without versioning):
	http://dpdk.org/dev/patchwork/patch/3140/
(this one had some comments you didn't address)
	http://dpdk.org/dev/patchwork/patch/3517/
(is it different from the first one?)
	http://dpdk.org/dev/patchwork/patch/3518/
(this one was wrongly formatted but authored with your ixiacom address)
	http://dpdk.org/dev/patchwork/patch/3537/
(it is different from the first one?)

Please check http://dpdk.org/dev#send for versioning and set the old versions
to "superseded" in patchwork.
Thanks


2015-02-20 11:35, Stefan Puiu:
>  In C++11 concatenated string literals need to have a
>  space in between. Found with clang++-3.4, IIRC g++-4.8 also complains about this. 
> 
> Sample error message:
> dpdk/include/rte_pci.h:96:26: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
> 
> Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>
> ---
>  lib/librte_eal/common/include/rte_pci.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
> index 66ed793..12ae5a7 100644
> --- a/lib/librte_eal/common/include/rte_pci.h
> +++ b/lib/librte_eal/common/include/rte_pci.h
> @@ -93,10 +93,10 @@ extern struct pci_device_list pci_device_list; /**< Global list of PCI devices.
>  #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
>  
>  /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
> -#define PCI_PRI_FMT "%.4"PRIx16":%.2"PRIx8":%.2"PRIx8".%"PRIx8
> +#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
>  
>  /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */
> -#define PCI_SHORT_PRI_FMT "%.2"PRIx8":%.2"PRIx8".%"PRIx8
> +#define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
>  
>  /** Nb. of values in PCI device identifier format string. */
>  #define PCI_FMT_NVAL 4
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] rte_pci.h: Fix C++11 compilation
  2015-02-20 11:26 ` Thomas Monjalon
@ 2015-02-20 12:22   ` Stefan Puiu
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Puiu @ 2015-02-20 12:22 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

Hi,

On Fri, Feb 20, 2015 at 1:26 PM, Thomas Monjalon
<thomas.monjalon@6wind.com> wrote:
> Hi Stefan,
>
> Thanks for improving DPDK for C++ usage.
>
> I'm a bit lost because that's the fourth time you send the same patch (without versioning):
>         http://dpdk.org/dev/patchwork/patch/3140/
> (this one had some comments you didn't address)

Sorry. I'm new to git-send-email and to patchwork; it seems some
versions got through to patchwork but didn't make it to the list? Will
have a look at fixing the mess. And I'll address the comments :).

>         http://dpdk.org/dev/patchwork/patch/3517/
> (is it different from the first one?)
>         http://dpdk.org/dev/patchwork/patch/3518/
> (this one was wrongly formatted but authored with your ixiacom address)
>         http://dpdk.org/dev/patchwork/patch/3537/
> (it is different from the first one?)
>
> Please check http://dpdk.org/dev#send for versioning and set the old versions
> to "superseded" in patchwork.
> Thanks
>
>
> 2015-02-20 11:35, Stefan Puiu:
>>  In C++11 concatenated string literals need to have a
>>  space in between. Found with clang++-3.4, IIRC g++-4.8 also complains about this.
>>
>> Sample error message:
>> dpdk/include/rte_pci.h:96:26: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
>>
>> Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>
>> ---
>>  lib/librte_eal/common/include/rte_pci.h |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
>> index 66ed793..12ae5a7 100644
>> --- a/lib/librte_eal/common/include/rte_pci.h
>> +++ b/lib/librte_eal/common/include/rte_pci.h
>> @@ -93,10 +93,10 @@ extern struct pci_device_list pci_device_list; /**< Global list of PCI devices.
>>  #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
>>
>>  /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
>> -#define PCI_PRI_FMT "%.4"PRIx16":%.2"PRIx8":%.2"PRIx8".%"PRIx8
>> +#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
>>
>>  /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */
>> -#define PCI_SHORT_PRI_FMT "%.2"PRIx8":%.2"PRIx8".%"PRIx8
>> +#define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
>>
>>  /** Nb. of values in PCI device identifier format string. */
>>  #define PCI_FMT_NVAL 4
>>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-20 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20  9:35 [dpdk-dev] [PATCH] rte_pci.h: Fix C++11 compilation Stefan Puiu
2015-02-20 11:26 ` Thomas Monjalon
2015-02-20 12:22   ` Stefan Puiu

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).