ruby-changes:49402
From: ngoto <ko1@a...>
Date: Sun, 31 Dec 2017 01:38:27 +0900 (JST)
Subject: [ruby-changes:49402] ngoto:r61518 (trunk): bit fields treating negative values should be declared as signed int
ngoto 2017-12-31 01:38:22 +0900 (Sun, 31 Dec 2017) New Revision: 61518 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61518 Log: bit fields treating negative values should be declared as signed int * internal.h (struct vm_ifunc_argc): Bit fields are unsigned by default. For storing nagative values to bit fields, they must be declated as signed int. Fix multiple test failure observed by 32-bit binaries compiled with Oracle Developer Studio (Solaris Studio) 12.x on Solaris 10 on sparc architecture. [Bug #14260] Modified files: trunk/internal.h Index: internal.h =================================================================== --- internal.h (revision 61517) +++ internal.h (revision 61518) @@ -914,8 +914,8 @@ struct vm_throw_data { https://github.com/ruby/ruby/blob/trunk/internal.h#L914 struct vm_ifunc_argc { #if SIZEOF_INT * 2 > SIZEOF_VALUE - int min: (SIZEOF_VALUE * CHAR_BIT) / 2; - int max: (SIZEOF_VALUE * CHAR_BIT) / 2; + signed int min: (SIZEOF_VALUE * CHAR_BIT) / 2; + signed int max: (SIZEOF_VALUE * CHAR_BIT) / 2; #else int min, max; #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/