mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/bigdecimal/bigdecimal.h (Real): suppress false warning from
clang. [ruby-core:41418] [Bug#5693] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b2e137c81e
commit
a394c59be3
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Dec 1 14:43:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.h (Real): suppress false warning from
|
||||
clang. [ruby-core:41418] [Bug#5693]
|
||||
|
||||
Thu Dec 1 10:31:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (LDFLAGS): -fstack-protector is always needed to
|
||||
|
|
|
@ -120,6 +120,12 @@ extern VALUE rb_cBigDecimal;
|
|||
#define VP_SIGN_POSITIVE_INFINITE 3 /* Positive infinite number */
|
||||
#define VP_SIGN_NEGATIVE_INFINITE -3 /* Negative infinite number */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define FLEXIBLE_ARRAY_SIZE 0
|
||||
#else
|
||||
#define FLEXIBLE_ARRAY_SIZE 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* VP representation
|
||||
* r = 0.xxxxxxxxx *BASE**exponent
|
||||
|
@ -144,7 +150,7 @@ typedef struct {
|
|||
* -3 : Negative infinite number
|
||||
*/
|
||||
short flag; /* Not used in vp_routines,space for user. */
|
||||
BDIGIT frac[1]; /* Pointer to array of fraction part. */
|
||||
BDIGIT frac[FLEXIBLE_ARRAY_SIZE]; /* Array of fraction part. */
|
||||
} Real;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue