From: ngotogenome@... Date: 2015-11-02T16:07:17+00:00 Subject: [ruby-dev:49327] [Ruby trunk - Bug #11645] [Open] Since r52422, failed to compile parse.y on Solaris 10 with Oracle Solaris Studio 12.3 Issue #11645 has been reported by Naohisa Goto. ---------------------------------------- Bug #11645: Since r52422, failed to compile parse.y on Solaris 10 with Oracle Solaris Studio 12.3 https://bugs.ruby-lang.org/issues/11645 * Author: Naohisa Goto * Status: Open * Priority: Normal * Assignee: * ruby -v: - * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Solaris 10 にて、 Oracle Solaris Studio 12.3 にて、parse.y (から生成された parse.c)のコンパイルに失敗します。 ~~~ ruby --disable=gems ./tool/id2token.rb --path-separator=.:./ --vpath=.ext/include/sparc64-solaris2.10/ruby:./include/ruby:./missing id.h parse.y > parse.tmp.y bison -d -o y.tab.c parse.tmp.y rm -f parse.tmp.y sed -f ./tool/ytab.sed -e "/^#/s!parse\.tmp\.[iy]!parse.y!" -e "/^#/s!y\.tab\.c!parse.c!" y.tab.c > parse.c.new mv parse.c.new parse.c sed -e "/^#line.*y\.tab\.h/d;/^#line.*parse.*\.y/d" y.tab.h > parse.h rm -f y.tab.c y.tab.h + cp ./lex.c.blt lex.c cc -xO4 -xtarget=sparc64viiplus -m64 -DRUBY_EXPORT -I/usr/local/64/lib/libffi-3.0.10/include -I/usr/local/64/include -I. -I.ext/include/sparc64-solaris2.10 -I./include -I. -o parse.o -c parse.c "parse.y", line 1256: operands have incompatible types: void ":" int "parse.y", line 1721: operands have incompatible types: void ":" int "parse.y", line 1813: operands have incompatible types: void ":" int "parse.y", line 2061: operands have incompatible types: void ":" int "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 174: warning: initializer will be sign-extended: -1 "defs/keywords", line 22: warning: initializer will be sign-extended: -1 "defs/keywords", line 22: warning: initializer will be sign-extended: -1 cc: acomp failed for parse.c make: *** [parse.o] Error 2 ~~~ 3項演算子の後ろ2項は同じ型である必要がある、というエラーのようです。 r52422にてparse.yに追加された以下のマクロが原因と思われます。 ~~~ +#define NO_QCALL(q, here) \ + ((q) != tDOTQ ? (void)0 : \ + yyerror(".? in "here" is not supported yet")) ~~~ -- https://bugs.ruby-lang.org/