summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-09 14:36:35 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-09 14:36:35 +0000
commit9631e3e788f95449d4b81395889c07670ef2dc82 (patch)
tree779094dfd7f1a87a210ebd5b42cb7c6f85a0f288
parenta9c42d1026c8f7bb32e07f78f6003964125897b9 (diff)
* bignum.c (absint_numwords_generic): set an array element after
definition of a variable to fix compile error with older version of fcc (Fujitsu C Compiler) 5.6 on Solaris 10 on Sparc. [Bug #10350] [ruby-dev:48608] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--bignum.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 006bbee8d4..0945986733 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Oct 9 23:31:47 2014 Naohisa Goto <ngotogenome@gmail.com>
+
+ * bignum.c (absint_numwords_generic): set an array element after
+ definition of a variable to fix compile error with older version
+ of fcc (Fujitsu C Compiler) 5.6 on Solaris 10 on Sparc.
+ [Bug #10350] [ruby-dev:48608]
+
Thu Oct 9 16:15:26 2014 Eric Wong <e@80x24.org>
* ext/-test-/st/foreach/extconf.rb: new file
diff --git a/bignum.c b/bignum.c
index 08b4337262..efc34bfd93 100644
--- a/bignum.c
+++ b/bignum.c
@@ -3294,7 +3294,7 @@ absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_num
static const BDIGIT char_bit[1] = { CHAR_BIT };
BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))];
BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)];
- BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte };
+ BDIGIT nlz_bits_in_msbyte_bary[1];
BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))];
BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS];
BDIGIT mod_bary[numberof(word_numbits_bary)];
@@ -3304,6 +3304,8 @@ absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_num
int sign;
size_t numwords;
+ nlz_bits_in_msbyte_bary[0] = nlz_bits_in_msbyte;
+
/*
* val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
* div, mod = val_numbits.divmod(word_numbits)