Project

General

Profile

Bug #13658

Compile error with Oracle Solaris Studio (Oracle Developer Studio) 12.4 in compile.c line 1622 (definition of BADINSN_ERROR)

Added by ngoto (Naohisa Goto) almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-dev:50152]

Description

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)

Associated revisions

Revision 70d6d8ac
Added by ko1 (Koichi Sasada) almost 2 years ago

simply call xfree().

  • compile.c (BADINSN_ERROR): mixing (void) and (int) will fail solaris compiler. [ruby-core:81668], [Bug #13658]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 59078
Added by ko1 (Koichi Sasada) almost 2 years ago

simply call xfree().

  • compile.c (BADINSN_ERROR): mixing (void) and (int) will fail solaris compiler. [ruby-core:81668], [Bug #13658]

Revision 59078
Added by ko1 (Koichi Sasada) almost 2 years ago

simply call xfree().

  • compile.c (BADINSN_ERROR): mixing (void) and (int) will fail solaris compiler. [ruby-core:81668], [Bug #13658]

Revision 59078
Added by ko1 (Koichi Sasada) almost 2 years ago

simply call xfree().

  • compile.c (BADINSN_ERROR): mixing (void) and (int) will fail solaris compiler. [ruby-core:81668], [Bug #13658]

History

#1

Updated by ko1 (Koichi Sasada) almost 2 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r59078.


simply call xfree().

  • compile.c (BADINSN_ERROR): mixing (void) and (int) will fail solaris compiler. [ruby-core:81668], [Bug #13658]

Also available in: Atom PDF