patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8185, Address C++11 Reserved...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8185: Address C++11 Reserved User-defined Literal Errors

Submitter:  Grant Erickson <marathon96>
Submitted:  Fri 20 Sep 2013 08:30:31 PM UTC
Votes: 1
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Sat 18 Jan 2014 08:48:16 PM UTC, comment #4: 

Ok, so that would be because this one is the only occurance in header files, and unless compiled as C++, the compiler doesn't complain. Fair enough. Thanks for the patch.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 17 Jan 2014 09:14:07 PM UTC, comment #3: 

I've seen the same warning in lwip 1.4.x and it was indeed only in these two places

Freddie Chopin <freddie_chopin>
Fri 17 Jan 2014 09:01:18 PM UTC, comment #2: 

Are these really the only 2 files where this is a problem? I thought the defines are used in many more places like that...?

Simon Goldschmidt <goldsimon>
Group administrator
Fri 06 Dec 2013 06:02:10 PM UTC, comment #1: 

gcc-4.8 also makes noise, although it gives a warning instead of an error.

Daniel Goertzen <goertzenator>
Fri 20 Sep 2013 08:30:31 PM UTC, original submission:  

This patch addresses the following error when compiled
 against clang/LLVM 3.3 with -std=c++11:

  error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]

diff --git a/src/include/ipv4/lwip/ip4_addr.h b/src/include/ipv4/lwip/ip4_addr.h
index b05ae53..923d4b0 100644
--- a/src/include/ipv4/lwip/ip4_addr.h
+++ b/src/include/ipv4/lwip/ip4_addr.h
@@ -210,7 +210,7 @@ u8_t ip4_addr_netmask_valid(u32_t netmask);
 #define ip_addr_islinklocal(addr1) (((addr1)->addr & PP_HTONL(0xffff0000UL)) == PP_HTONL(0xa9fe0000UL))
 
 #define ip_addr_debug_print(debug, ipaddr) \
-  LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F,             \
+  LWIP_DEBUGF(debug, ("%" U16_F ".%" U16_F ".%" U16_F ".%" U16_F,      \
                       ipaddr != NULL ? ip4_addr1_16(ipaddr) : 0,       \
                       ipaddr != NULL ? ip4_addr2_16(ipaddr) : 0,       \
                       ipaddr != NULL ? ip4_addr3_16(ipaddr) : 0,       \
diff --git a/src/include/ipv6/lwip/ip6_addr.h b/src/include/ipv6/lwip/ip6_addr.h
index 89b5b81..8a540d4 100644
--- a/src/include/ipv6/lwip/ip6_addr.h
+++ b/src/include/ipv6/lwip/ip6_addr.h
@@ -260,7 +260,7 @@ Little-endian version, stored in network order (no htonl). */
 #define ip6_addr_isdeprecated(addr_state) (addr_state == IP6_ADDR_DEPRECATED)
 
 #define ip6_addr_debug_print(debug, ipaddr) \
-  LWIP_DEBUGF(debug, ("%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F, \
+  LWIP_DEBUGF(debug, ("%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F, \
                       ipaddr != NULL ? IP6_ADDR_BLOCK1(ipaddr) : 0,    \
                       ipaddr != NULL ? IP6_ADDR_BLOCK2(ipaddr) : 0,    \
                       ipaddr != NULL ? IP6_ADDR_BLOCK3(ipaddr) : 0,    \

Grant Erickson <marathon96>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by freddie_chopin (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by goertzenator (Posted a comment)
  • -email is unavailable- added by goertzenator (Voted in favor of this item)
  • -email is unavailable- added by marathon96 (Submitted the item)
  •  

    There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-18 goldsimon StatusNeed Info Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2014-01-17 goldsimon StatusNone Need Info
    2013-12-06 goertzenator Carbon-Copy- Added goertzenator
    2013-09-20 marathon96 Attached File- Added reserved-user-defined-literal-0001.0.patch, #29186

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code