From 126439237eeccce05608d9d431e3bf1c4d68e49a Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 21 Jun 2017 20:49:40 +0200 Subject: Removed ACE_REGISTER completely. register is a compiler hint which is mostly ignored by compilers and recent compilers all give warnings when register is still used. * ACE/ASNMP/asnmp/asn1.cpp: * ACE/ace/CDR_Base.cpp: * ACE/ace/CDR_Base.inl: * ACE/ace/ETCL/ETCL_y.cpp: * ACE/ace/Global_Macros.h: * ACE/ace/Handle_Set.cpp: * ACE/ace/OS_NS_stdlib.cpp: * ACE/ace/OS_NS_string.cpp: --- ACE/ace/CDR_Base.inl | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) (limited to 'ACE/ace/CDR_Base.inl') diff --git a/ACE/ace/CDR_Base.inl b/ACE/ace/CDR_Base.inl index 2a93c82b632..24000ac669e 100644 --- a/ACE/ace/CDR_Base.inl +++ b/ACE/ace/CDR_Base.inl @@ -86,8 +86,8 @@ ACE_CDR::swap_2 (const char *orig, char* target) __asm rol ax, 8; __asm mov [ecx], ax; #else - ACE_REGISTER ACE_UINT16 usrc = * reinterpret_cast (orig); - ACE_REGISTER ACE_UINT16* udst = reinterpret_cast (target); + ACE_UINT16 usrc = * reinterpret_cast (orig); + ACE_UINT16* udst = reinterpret_cast (target); *udst = (usrc << 8) | (usrc >> 8); #endif /* ACE_HAS_PENTIUM */ } @@ -108,7 +108,7 @@ ACE_CDR::swap_4 (const char* orig, char* target) bswap_32 (*reinterpret_cast (orig)); #elif defined(ACE_HAS_INTEL_ASSEMBLY) // We have ACE_HAS_PENTIUM, so we know the sizeof's. - ACE_REGISTER unsigned int j = + unsigned int j = *reinterpret_cast (orig); asm ("bswap %1" : "=r" (j) : "0" (j)); *reinterpret_cast (target) = j; @@ -121,7 +121,7 @@ ACE_CDR::swap_4 (const char* orig, char* target) __asm bswap eax; __asm mov [ecx], eax; #else - ACE_REGISTER ACE_UINT32 x = * reinterpret_cast (orig); + ACE_UINT32 x = * reinterpret_cast (orig); x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24); * reinterpret_cast (target) = x; #endif /* ACE_HAS_INTRINSIC_BYTESWAP */ @@ -143,16 +143,14 @@ ACE_CDR::swap_8 (const char* orig, char* target) bswap_64 (*reinterpret_cast (orig)); #elif (defined (__amd64__) || defined (__x86_64__)) && defined(__GNUG__) \ && !defined(ACE_LACKS_INLINE_ASSEMBLY) - ACE_REGISTER unsigned long x = + unsigned long x = * reinterpret_cast (orig); asm ("bswapq %1" : "=r" (x) : "0" (x)); *reinterpret_cast (target) = x; #elif defined(ACE_HAS_PENTIUM) && defined(__GNUG__) \ && !defined(ACE_LACKS_INLINE_ASSEMBLY) - ACE_REGISTER unsigned int i = - *reinterpret_cast (orig); - ACE_REGISTER unsigned int j = - *reinterpret_cast (orig + 4); + unsigned int i =*reinterpret_cast (orig); + unsigned int j = *reinterpret_cast (orig + 4); asm ("bswap %1" : "=r" (i) : "0" (i)); asm ("bswap %1" : "=r" (j) : "0" (j)); *reinterpret_cast (target + 4) = i; @@ -170,20 +168,17 @@ ACE_CDR::swap_8 (const char* orig, char* target) __asm mov [edx], ebx; #elif ACE_SIZEOF_LONG == 8 // 64 bit architecture. - ACE_REGISTER unsigned long x = - * reinterpret_cast (orig); - ACE_REGISTER unsigned long x84 = (x & 0x000000ff000000ffUL) << 24; - ACE_REGISTER unsigned long x73 = (x & 0x0000ff000000ff00UL) << 8; - ACE_REGISTER unsigned long x62 = (x & 0x00ff000000ff0000UL) >> 8; - ACE_REGISTER unsigned long x51 = (x & 0xff000000ff000000UL) >> 24; + unsigned long x = * reinterpret_cast (orig); + unsigned long x84 = (x & 0x000000ff000000ffUL) << 24; + unsigned long x73 = (x & 0x0000ff000000ff00UL) << 8; + unsigned long x62 = (x & 0x00ff000000ff0000UL) >> 8; + unsigned long x51 = (x & 0xff000000ff000000UL) >> 24; x = (x84 | x73 | x62 | x51); x = (x << 32) | (x >> 32); *reinterpret_cast (target) = x; #else - ACE_REGISTER ACE_UINT32 x = - * reinterpret_cast (orig); - ACE_REGISTER ACE_UINT32 y = - * reinterpret_cast (orig + 4); + ACE_UINT32 x = * reinterpret_cast (orig); + ACE_UINT32 y = * reinterpret_cast (orig + 4); x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24); y = (y << 24) | ((y & 0xff00) << 8) | ((y & 0xff0000) >> 8) | (y >> 24); * reinterpret_cast (target) = y; -- cgit v1.2.1