ruby-changes:35778
From: ngoto <ko1@a...>
Date: Thu, 9 Oct 2014 23:36:44 +0900 (JST)
Subject: [ruby-changes:35778] ngoto:r47860 (trunk): * bignum.c (absint_numwords_generic): set an array element after
ngoto 2014-10-09 23:36:35 +0900 (Thu, 09 Oct 2014) New Revision: 47860 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47860 Log: * 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] Modified files: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47859) +++ ChangeLog (revision 47860) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Oct 9 23:31:47 2014 Naohisa Goto <ngotogenome@g...> + + * 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@8...> * ext/-test-/st/foreach/extconf.rb: new file Index: bignum.c =================================================================== --- bignum.c (revision 47859) +++ bignum.c (revision 47860) @@ -3294,7 +3294,7 @@ absint_numwords_generic(size_t numbytes, https://github.com/ruby/ruby/blob/trunk/bignum.c#L3294 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, https://github.com/ruby/ruby/blob/trunk/bignum.c#L3304 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/