ruby-changes:21464
From: nobu <ko1@a...>
Date: Sun, 23 Oct 2011 18:03:43 +0900 (JST)
Subject: [ruby-changes:21464] nobu:r33513 (trunk): * numeric.c (rb_infinity, rb_nan): aggregated member initializers
nobu 2011-10-23 18:03:33 +0900 (Sun, 23 Oct 2011) New Revision: 33513 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33513 Log: * numeric.c (rb_infinity, rb_nan): aggregated member initializers need braces. Modified files: trunk/ChangeLog trunk/numeric.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33512) +++ ChangeLog (revision 33513) @@ -1,3 +1,8 @@ +Sun Oct 23 18:03:31 2011 Nobuyoshi Nakada <nobu@r...> + + * numeric.c (rb_infinity, rb_nan): aggregated member initializers + need braces. + Sun Oct 23 16:43:43 2011 Naohisa Goto <ngotogenome@g...> * ext/io/wait/wait.c: ioctl(2) is declared in unistd.h on Solaris. Index: numeric.c =================================================================== --- numeric.c (revision 33512) +++ numeric.c (revision 33513) @@ -66,16 +66,16 @@ #ifdef HAVE_INFINITY #elif !defined(WORDS_BIGENDIAN) /* BYTE_ORDER == LITTLE_ENDIAN */ -const union bytesequence4_or_float rb_infinity = { 0x00, 0x00, 0x80, 0x7f }; +const union bytesequence4_or_float rb_infinity = {{0x00, 0x00, 0x80, 0x7f}}; #else -const union bytesequence4_or_float rb_infinity = { 0x7f, 0x80, 0x00, 0x00 }; +const union bytesequence4_or_float rb_infinity = {{0x7f, 0x80, 0x00, 0x00}}; #endif #ifdef HAVE_NAN #elif !defined(WORDS_BIGENDIAN) /* BYTE_ORDER == LITTLE_ENDIAN */ -const union bytesequence4_or_float rb_nan = { 0x00, 0x00, 0xc0, 0x7f }; +const union bytesequence4_or_float rb_nan = {{0x00, 0x00, 0xc0, 0x7f}}; #else -const union bytesequence4_or_float rb_nan = { 0x7f, 0xc0, 0x00, 0x00 }; +const union bytesequence4_or_float rb_nan = {{0x7f, 0xc0, 0x00, 0x00}}; #endif #ifndef HAVE_ROUND -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/