[前][次][番号順一覧][スレッド一覧]

ruby-changes:22221

From: ngoto <ko1@a...>
Date: Thu, 12 Jan 2012 00:01:08 +0900 (JST)
Subject: [ruby-changes:22221] ngoto:r34270 (trunk): * string.c (rb_str_concat): set array element after definition

ngoto	2012-01-12 00:00:57 +0900 (Thu, 12 Jan 2012)

  New Revision: 34270

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34270

  Log:
    * string.c (rb_str_concat): set array element after definition
      to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
      on Sparc.  [Bug #5878] [ruby-dev:45123]

  Modified files:
    trunk/ChangeLog
    trunk/string.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34269)
+++ ChangeLog	(revision 34270)
@@ -1,3 +1,9 @@
+Wed Jan 11 23:40:21 2012  Naohisa Goto  <ngoto@g...>
+
+	* string.c (rb_str_concat): set array element after definition
+	  to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
+	  on Sparc.  [Bug #5878] [ruby-dev:45123]
+
 Wed Jan 11 22:52:51 2012  CHIKANAGA Tomoyuki  <nagachika00@g...>
 
 	* gc.c (ruby_mimmalloc): don't set allocated size to header.
Index: string.c
===================================================================
--- string.c	(revision 34269)
+++ string.c	(revision 34270)
@@ -2093,7 +2093,8 @@
 
     if (enc == rb_usascii_encoding()) {
 	/* US-ASCII automatically extended to ASCII-8BIT */
-	char buf[1] = {(char)code};
+	char buf[1];
+	buf[0] = (char)code;
 	if (code > 0xFF) {
 	    rb_raise(rb_eRangeError, "%u out of char range", code);
 	}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]