Issue #14199 has been reported by ngoto (Naohisa Goto).

----------------------------------------
Bug #14199: eval_error.c compile error with Oracle Solaris Studio (Oracle Developer Studio) 12.4 on Solaris 10
https://bugs.ruby-lang.org/issues/14199

* Author: ngoto (Naohisa Goto)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
おそらく r61154 以降、Solaris 10 上の Oracle Solaris Studio 12.4 にて、
下記のエラーにより eval.c のコンパイルに失敗します。

write_warn, write_warn2, write_warn_str の各マクロ定義中にて、
三項演算子「? :」の右側の2項(「AAA ? BBB : CCC」の BBB と CCC)の型が不統一、
具体的には void型を返す関数 と VALUE型を返す関数が混在しているのが原因です。

~~~
cc -errtags=yes  -xO4 -xtarget=sparc64xplus -m64 -DRUBY_DEVEL=1 -DRUBY_EXPORT -I/usr/local/64/lib/libffi-3.0.10/include -I/usr/local/64/include -D_XOPEN_SOURCE=500   -I. -I.ext/include/sparc64-solaris2.10 -I./include-I. -I./enc/unicode/10.0.0 -o eval.o -c eval.c
"vm_core.h", line 1021: warning: enumerator value overflows INT_MAX (2147483647) (E_ENUM_VAL_OVERFLOWS_INT_MAX)
"vm_core.h", line 1022: warning: enumerator value overflows INT_MAX (2147483647) (E_ENUM_VAL_OVERFLOWS_INT_MAX)
"vm_core.h", line 1024: warning: enumerator value overflows INT_MAX (2147483647) (E_ENUM_VAL_OVERFLOWS_INT_MAX)
"eval_error.c", line 38: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 104: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 105: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 108: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 117: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 118: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 125: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 126: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 127: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 139: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 141: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 142: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 143: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 144: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 145: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 146: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 149: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 151: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 154: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 179: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 182: operands have incompatible types:
         void ":" unsigned long
"eval_error.c", line 209: operands have incompatible types:
         void ":" unsigned long
"eval.c", line 716: warning: statement not reached (E_STATEMENT_NOT_REACHED)
cc: acomp failed for eval.c
make: *** [eval.o] Error 2
~~~





-- 
https://bugs.ruby-lang.org/