diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-02 06:41:53 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-02 06:41:53 +0000 |
commit | a6b50f379d4b71acac73ac6b22cbe2d2c5b50b3f (patch) | |
tree | d61a726ab3871a8ab56541b5201c30c59271fc55 /internal.h | |
parent | a5a5714b77ff356742fe0fceab1d97ac123116e0 (diff) |
statement experssion is a GCCism
should mark as such.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal.h b/internal.h index 8d92d9510a..25b382e554 100644 --- a/internal.h +++ b/internal.h @@ -109,7 +109,7 @@ extern "C" { __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0) #elif defined HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW #define MUL_OVERFLOW_P(a, b) \ - ({__typeof__(a) c; __builtin_mul_overflow((a), (b), &c);}) + RB_GNUC_EXTENSION_BLOCK(__typeof__(a) c; __builtin_mul_overflow((a), (b), &c)) #endif #define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \ @@ -122,10 +122,10 @@ extern "C" { #ifdef HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P /* __builtin_mul_overflow_p can take bitfield */ /* and GCC permits bitfields for integers other than int */ -#define MUL_OVERFLOW_FIXNUM_P(a, b) ({ \ +#define MUL_OVERFLOW_FIXNUM_P(a, b) RB_GNUC_EXTENSION_BLOCK( \ struct { long fixnum : SIZEOF_LONG * CHAR_BIT - 1; } c; \ __builtin_mul_overflow_p((a), (b), c.fixnum); \ -}) +) #else #define MUL_OVERFLOW_FIXNUM_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX) #endif |