[Bug #2118] SUN $B$N(B cc (SunStudio11 C 5.8 $B%3%s%Q%$%i(B) $B$G(B dir.c $B$N%3%s%Q%$%k$K<:

Bug #2118: SUN e$B$Ne(B cc (SunStudio11 C 5.8 e$B%3%s%Q%$%ie(B) e$B$Ge(B
dir.c e$B$N%3%s%Q%$%k$K<:GT$9$ke(B
http://redmine.ruby-lang.org/issues/show/2118

e$B5/I<<Te(B: Naohisa G.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.2dev (2009-09-18) [sparc-solaris2.10]

Solaris10 e$B>e$Ne(B Sun Studio 11 C 5.8 e$B%3%s%Q%$%i$K$Fe(B trunk
r25000 e$B$Ne(B
e$B%3%s%Q%$%k$K<:GT$7$^$9!#e(B

$ ./configure --prefix=/XXXXX/testruby/sparc/trunk-25000_64cc
MAKE=/usr/local/64/bin/make
CC=/opt/SUNWspro/bin/cc
CXX=/opt/SUNWspro/bin/CC
CFLAGS=“-xarch=v9 -xtarget=native64 -I/usr/local/64/include”
LDSHARED=“/opt/SUNWspro/bin/cc -G”
LDFLAGS=“-xarch=v9 -xtarget=native64 -L/usr/local/64/lib
-R/usr/local/64/lib”

$ /usr/local/64/bin/make
(e$BCfN,e(B)
/opt/SUNWspro/bin/cc -xarch=v9 -xtarget=native64 -I/usr/local/64/include
-I. -I.ext/include/sparc-solaris2.10 -I./include -I. -DRUBY_EXPORT -o
dir.o -c dir.c
“./include/ruby/ruby.h”, line 958: warning: implicit function
declaration: rb_type
“dir.c”, line 394: operands have incompatible types:
void “:” unsigned long
“dir.c”, line 394: operands have incompatible types:
volatile unsigned long “:” void
“dir.c”, line 1632: operands have incompatible types:
void “:” unsigned long
“dir.c”, line 1632: operands have incompatible types:
volatile unsigned long “:” void
“dir.c”, line 1662: operands have incompatible types:
void “:” unsigned long
“dir.c”, line 1662: operands have incompatible types:
volatile unsigned long “:” void
cc: acomp failed for dir.c
make: *** [dir.o] Error 2

Warninge$B$O$$$C$?$s$OL5;k$7$F!"%(%i!<$KCeL$9$k$H!"e(B

“dir.c”, line 394: operands have incompatible types:
void “:” unsigned long
e$B$,H/@8$7$F$$$k9T$NFbMF$O!"e(B
GlobPathValue(dirname, FALSE);
e$B$G$9!#$3$l$O%^%/%m$G!"e(B
#define GlobPathValue(str, safe)
/* can contain null bytes as separators */
(!RB_TYPE_P(str, T_STRING) ?
FilePathValue(str) :
(safe) ? rb_check_safe_obj(str) : (str))
e$B$N$h$&$Ke(B3e$B91i;;;R$r;HMQ$7$F$$$F!"e(B e$B$3$NCf$Ge(B rb_check_safe_obj(str) e$B$,e(B void e$B$rJV$94X?t$N$?$a!"e(B 3e$B91i;;;RFb$G7?$K8_49@-$,$J$$$H$$$&%(%i!<$r=P$7$F$$$k$h$&$G$9!#e(B

e$B0J2<$N$h$&$K!Ve(B,e$B!W$r;H$C$FCMe(B 0
e$B$rJV$9$h$&$K$7$?$i%3%s%Q%$%k$ODL$j$^$7$?!#e(B
rb_check_safe_obj(str)
e$B$r0O$`e(B()e$B$OITMW$+$b$7$l$^$;$s$,G0$N$?$aF~$l$^$7$?!#e(B

— dir.c (revision 25000)
+++ dir.c (working copy)
@@ -343,7 +343,7 @@
/* can contain null bytes as separators */
(!RB_TYPE_P(str, T_STRING) ?
FilePathValue(str) : \

  • (safe) ? rb_check_safe_obj(str) : (str))
    
  • (safe) ? ((rb_check_safe_obj(str)),0) : (str))
    

static VALUE
dir_s_alloc(VALUE klass)

“./include/ruby/ruby.h”, line 958: warning: implicit function
declaration: rb_type
e$B$O:#$N$H$3$me(B gcc e$B0J30$N>l9g$K$N$_=P$ke(B warning
e$B$N$h$&$G!"e(B
rb_type e$B$N%W%m%H%?%$%W@k8@$re(B TYPE()
e$B$,;H$o$l$kA0$KF~$l$l$P>C$($^$7$?!#e(B

— include/ruby/ruby.h (revision 25000)
+++ include/ruby/ruby.h (working copy)
@@ -952,6 +952,7 @@
#ifdef GNUC

define NUM2CHR(x) ({VALUE num2chr_x = (x);

NUM2CHR_internal(num2chr_x);})
#else
+static inline int rb_type(VALUE);
static inline char
NUM2CHR(VALUE x)
{