OSDN Git Service

Work around another C++11 compliance issue; fix bug [#2321].
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Sun, 27 Nov 2016 12:40:01 +0000 (12:40 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Sun, 27 Nov 2016 12:40:01 +0000 (12:40 +0000)
mingwrt/ChangeLog
mingwrt/include/excpt.h

index 3a71f3a..d902839 100644 (file)
@@ -1,3 +1,11 @@
+2016-11-27  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Work around another C++11 compliance issue; fix bug [#2321].
+
+       * include/excpt.h (__try1_setup, __except1_teardown): Add spaces to
+       separate each use of '__wsize' and '__ts' macros from all surrounding
+       string literals, to ensure that C++ parses them as distinct tokens.
+
 2016-11-21  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Replace defective powf() and powl() function implementations.
index df03176..c5eebbb 100644 (file)
@@ -135,8 +135,8 @@ typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
   __hook = __typecast_alloca( EXCEPTION_REGISTRATION );                \
   __hook->handler = __handler;                                         \
   __asm__ __volatile__                                                 \
-  ( "mov{%z0}\t{%%|%0, "__wsize" }"__ts":{|[}0x0{, %0|]}\n\t"          \
-    "mov{%z1}\t{%1, %%|"__wsize" }"__ts":{|[}0x0{|], %1}"              \
+  ( "mov{%z0}\t{%%|%0, " __wsize " }" __ts ":{|[}0x0{, %0|]}\n\t"      \
+    "mov{%z1}\t{%1, %%|" __wsize " }" __ts ":{|[}0x0{|], %1}"          \
     :"=r"(__hook->prev):"r"(__hook):"memory"                           \
   );                                                                   \
 }
@@ -152,9 +152,9 @@ typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
 #define __except1_teardown(__wsize,__ts)                               \
 { register EXCEPTION_REGISTRATION *__hook;                             \
   __asm__ __volatile__                                                 \
-  ( "mov{%z0}\t{%%|%0, "__wsize" }"__ts":{|[}0x0{, %0|]}\n\t"          \
-    "mov{%z0}\t{(}%0{)}, {|"__wsize" [}%0{|]}\n\t"                     \
-    "mov{%z0}\t{%0, %%|"__wsize" }"__ts":{|[}0x0{|], %0}"              \
+  ( "mov{%z0}\t{%%|%0, " __wsize " }" __ts ":{|[}0x0{, %0|]}\n\t"      \
+    "mov{%z0}\t{(}%0{)}, {|" __wsize " [}%0{|]}\n\t"                   \
+    "mov{%z0}\t{%0, %%|" __wsize " }" __ts ":{|[}0x0{|], %0}"          \
     :"+r"(__hook)::"memory"                                            \
   );                                                                   \
 }