From: ngotogenome@... Date: 2017-06-14T04:15:06+00:00 Subject: [ruby-dev:50152] [Ruby trunk Bug#13658] Compile error with Oracle Solaris Studio (Oracle Developer Studio) 12.4 in compile.c line 1622 (definition of BADINSN_ERROR) Issue #13658 has been reported by ngoto (Naohisa Goto). ---------------------------------------- Bug #13658: Compile error with Oracle Solaris Studio (Oracle Developer Studio) 12.4 in compile.c line 1622 (definition of BADINSN_ERROR) https://bugs.ruby-lang.org/issues/13658 * Author: ngoto (Naohisa Goto) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- r59074 付近以降、Solaris 10 上の Oracle Solaris Studio 12.4 にて、 以下のエラーにより compile.c のコンパイルに失敗します。 ~~~ "compile.c", line 1622: operands have incompatible types: void ":" int "compile.c", line 1622: operands have incompatible types: void ":" int "compile.c", line 1653: operands have incompatible types: void ":" int "compile.c", line 1653: operands have incompatible types: void ":" int "compile.c", line 1671: operands have incompatible types: void ":" int "compile.c", line 1671: operands have incompatible types: void ":" int "compile.c", line 1686: operands have incompatible types: void ":" int "compile.c", line 1686: operands have incompatible types: void ":" int "compile.c", line 1779: operands have incompatible types: void ":" int "compile.c", line 1779: operands have incompatible types: void ":" int ~~~ 以下の BADINSN_ERROR の定義にて、演算子「,」の各項、または三項演算子「?」の右側の2項に、void型を返す関数 と int型を返す関数(または定数 0)が混在しているのが原因のようです。 ~~~ #define BADINSN_ERROR \ (generated_iseq ? xfree(generated_iseq) : 0, \ line_info_table ? xfree(line_info_table) : 0, \ BADINSN_DUMP(anchor, list, NULL), \ COMPILE_ERROR) ~~~ -- https://bugs.ruby-lang.org/