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

ruby-changes:33494

From: nobu <ko1@a...>
Date: Sat, 12 Apr 2014 21:58:09 +0900 (JST)
Subject: [ruby-changes:33494] nobu:r45575 (trunk): marshal.c: remove hack for old gcc

nobu	2014-04-12 21:58:04 +0900 (Sat, 12 Apr 2014)

  New Revision: 45575

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

  Log:
    marshal.c: remove hack for old gcc
    
    * marshal.c (r_object0): remove hack for old gcc, no gcc 2.x any
      more.

  Modified files:
    trunk/marshal.c
Index: marshal.c
===================================================================
--- marshal.c	(revision 45574)
+++ marshal.c	(revision 45575)
@@ -9,6 +9,10 @@ https://github.com/ruby/ruby/blob/trunk/marshal.c#L9
 
 **********************************************************************/
 
+#if defined __GNUC__ && __GNUC__ < 3
+# error too old GCC
+#endif
+
 #include "ruby/ruby.h"
 #include "ruby/io.h"
 #include "ruby/st.h"
@@ -1700,7 +1704,7 @@ r_object0(struct load_arg *arg, int *ivp https://github.com/ruby/ruby/blob/trunk/marshal.c#L1704
 
       case TYPE_ARRAY:
 	{
-	    volatile long len = r_long(arg); /* gcc 2.7.2.3 -O2 bug?? */
+	    long len = r_long(arg);
 
 	    v = rb_ary_new2(len);
 	    v = r_entry(v, arg);
@@ -1739,7 +1743,7 @@ r_object0(struct load_arg *arg, int *ivp https://github.com/ruby/ruby/blob/trunk/marshal.c#L1743
       case TYPE_STRUCT:
 	{
 	    VALUE mem, values;
-	    volatile long i;	/* gcc 2.7.2.3 -O2 bug?? */
+	    long i;
 	    ID slot;
 	    st_index_t idx = r_prepare(arg);
 	    VALUE klass = path2class(r_unique(arg));

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

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