dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix C++11 compilation error with rte_pci.h
@ 2015-02-19 20:59 Stefan Puiu
       [not found] ` <1424379569-15851-1-git-send-email-stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Puiu @ 2015-02-19 20:59 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

 In C++11 concatenated string literals need to have a
 space in between. Found while trying to compile with clang++-3.4. 

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 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 related	[flat|nested] 4+ messages in thread

* [PATCH] Fix compilation error when compiling with clang-3.4 in C++11 mode: in C++11 concatenated string literals need to have a space in between.
       [not found] ` <1424379569-15851-1-git-send-email-stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-02-19 20:59   ` Stefan Puiu
       [not found]     ` <1424379569-15851-2-git-send-email-stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Puiu @ 2015-02-19 20:59 UTC (permalink / raw)
  To: dev-VfR2kkLFssw; +Cc: Stefan Puiu

From: Stefan Puiu <spuiu-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>

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]
---
 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 related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix compilation error when compiling with clang-3.4 in C++11 mode: in C++11 concatenated string literals need to have a space in between.
       [not found]     ` <1424379569-15851-2-git-send-email-stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-02-20  8:19       ` De Lara Guarch, Pablo
       [not found]         ` <E115CCD9D858EF4F90C690B0DCB4D89727261905-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2015-02-20  8:19 UTC (permalink / raw)
  To: Stefan Puiu, dev-VfR2kkLFssw@public.gmane.org; +Cc: Stefan Puiu

Hi Stefan,

> -----Original Message-----
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Stefan Puiu
> Sent: Thursday, February 19, 2015 8:59 PM
> To: dev-VfR2kkLFssw@public.gmane.org
> Cc: Stefan Puiu
> Subject: [dpdk-dev] [PATCH] Fix compilation error when compiling with
> clang-3.4 in C++11 mode: in C++11 concatenated string literals need to have a
> space in between.
> 
> From: Stefan Puiu <spuiu-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
> 
> 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]

You forgot to include "Signed-off".

Pablo
> ---
>  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] 4+ messages in thread

* Re: [PATCH] Fix compilation error when compiling with clang-3.4 in C++11 mode: in C++11 concatenated string literals need to have a space in between.
       [not found]         ` <E115CCD9D858EF4F90C690B0DCB4D89727261905-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2015-02-20  8:34           ` Stefan Puiu
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Puiu @ 2015-02-20  8:34 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev-VfR2kkLFssw@public.gmane.org, Stefan Puiu

Hi Pablo,

On Fri, Feb 20, 2015 at 10:19 AM, De Lara Guarch, Pablo
<pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> Hi Stefan,
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Stefan Puiu
>> Sent: Thursday, February 19, 2015 8:59 PM
>> To: dev-VfR2kkLFssw@public.gmane.org
>> Cc: Stefan Puiu
>> Subject: [dpdk-dev] [PATCH] Fix compilation error when compiling with
>> clang-3.4 in C++11 mode: in C++11 concatenated string literals need to have a
>> space in between.
>>
>> From: Stefan Puiu <spuiu-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
>>
>> 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]
>
> You forgot to include "Signed-off".

Oops, you're right. I'll resend. Thanks for looking over this.

Stefan.

>
> Pablo
>> ---
>>  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] 4+ messages in thread

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 20:59 [PATCH] Fix C++11 compilation error with rte_pci.h Stefan Puiu
     [not found] ` <1424379569-15851-1-git-send-email-stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-19 20:59   ` [PATCH] Fix compilation error when compiling with clang-3.4 in C++11 mode: in C++11 concatenated string literals need to have a space in between Stefan Puiu
     [not found]     ` <1424379569-15851-2-git-send-email-stefan.puiu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-20  8:19       ` De Lara Guarch, Pablo
     [not found]         ` <E115CCD9D858EF4F90C690B0DCB4D89727261905-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-20  8:34           ` 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).