Skip to content
Prev Previous commit
Next Next commit
merge revision(s) r47860: [Backport ruby#10350]
	* 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 ruby#10350] [ruby-dev:48608]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@48303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nagachika committed Nov 6, 2014
commit d4239a936874ee459491b562eddbeee661c20fe3
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Thu Nov 6 22:57:43 2014 Naohisa Goto <[email protected]>

* 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 Nov 6 22:36:55 2014 Naohisa Goto <[email protected]>

* compile.c (compile_data_alloc): add padding when strict alignment
Expand Down
4 changes: 3 additions & 1 deletion bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)];
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.1.5"
#define RUBY_RELEASE_DATE "2014-11-06"
#define RUBY_PATCHLEVEL 271
#define RUBY_PATCHLEVEL 272

#define RUBY_RELEASE_YEAR 2014
#define RUBY_RELEASE_MONTH 11
Expand Down