Project

General

Profile

Bug #12470

Since r54952, TestMkmf::TestConvertible failed on Solaris 10 with Oracle SolarisStudio 12.x cc

Added by ngoto (Naohisa Goto) over 3 years ago. Updated over 3 years ago.

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

Description

おそらく r54952 から、Solaris 10 上の Oracle Solaris Studio 12.3 または 12.4 にてコンパイルすると、
TestMkmf::TestConvertible#test_typeof_builtin
TestMkmf::TestConvertible#test_typeof_typedef
がfailureになります。

以下のように、include/ruby/intern.h の485行目と787行目にWarningが出ています。(r55322 の場合)

convertible_int: checking for convertible type of signed short... -------------------- failed

"cc -o conftest -I. -I/XXXXX-trunk-55322/.ext/include/sparc64-solaris2.10 -I/XXXXX-trunk-55322/include -I./test -I/usr/local/64/lib/libffi-3.0.10/include -I/usr/local/64/include  -D_XOPEN_SOURCE=500   -errtags=yes  -xO4 -xtarget=sparc64viiplus conftest.c  -L. -L/XXXXX-trunk-55322 -R/XXXXX-trunk-55322 -L.  -L/usr/local/64/lib -R/usr/local/64/lib  -m64   -R/XXXXX-trunk/lib -L/XXXXX-trunk/lib -lruby-static  -lpthread -lrt -lgmp -lsocket -ldl -lcrypt -lm   -lc"
"/XXXXX-trunk-55322/include/ruby/intern.h", line 485: warning: syntax error:  empty declaration (E_EMPTY_DECLARATION)
"/XXXXX-trunk-55322/include/ruby/intern.h", line 787: warning: syntax error:  empty declaration (E_EMPTY_DECLARATION)
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

これらの行を git blame include/ruby/intern.h して見ると、

28f5e12c include/ruby/intern.h (naruse      2016-05-08 17:44:51 +0000 485) PUREFUNC(int rb_during_gc(void););
(中略)
28f5e12c include/ruby/intern.h (naruse      2016-05-08 17:44:51 +0000 787) PUREFUNC(size_t rb_str_capacity(VALUE););

PUREFUNC()はその機能が存在しないコンパイラでは #define PUREFNC(x) x されているため、マクロ展開後に int rb_during_gc(void);; などとして解釈され、セミコロンが1個多くなった=何も内容の無い行が出来たので、 "warning: syntax error: empty declaration" となったようです。

他のPUREFUNC使用箇所との整合性を考えると、括弧内のセミコロンを削除し、行末のセミコロンを残すのがよさそうです。

同様の余計なセミコロンは、別ファイルにも見られたので、grepして全部解消したいと思います。


Related issues

Related to Ruby master - Bug #11644: Since r52055, TestMkmf::TestConvertible failed on Solaris 10 with fccClosedActions

Associated revisions

Revision fd25eea0
Added by ngoto (Naohisa Goto) over 3 years ago

  • include/ruby/intern.h: Remove excess semicolons in PUREFUNC(). Fix failure of TestMkmf::TestConvertible on Solaris with Oracle Solaris Studio 12. [ruby-dev:49651] [Bug #12470]
  • internal.h: ditto.

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

Revision 55327
Added by ngoto (Naohisa Goto) over 3 years ago

  • include/ruby/intern.h: Remove excess semicolons in PUREFUNC(). Fix failure of TestMkmf::TestConvertible on Solaris with Oracle Solaris Studio 12. [ruby-dev:49651] [Bug #12470]
  • internal.h: ditto.

Revision 55327
Added by ngoto (Naohisa Goto) over 3 years ago

  • include/ruby/intern.h: Remove excess semicolons in PUREFUNC(). Fix failure of TestMkmf::TestConvertible on Solaris with Oracle Solaris Studio 12. [ruby-dev:49651] [Bug #12470]
  • internal.h: ditto.

Revision 55327
Added by ngoto (Naohisa Goto) over 3 years ago

  • include/ruby/intern.h: Remove excess semicolons in PUREFUNC(). Fix failure of TestMkmf::TestConvertible on Solaris with Oracle Solaris Studio 12. [ruby-dev:49651] [Bug #12470]
  • internal.h: ditto.

Revision 55327
Added by ngoto (Naohisa Goto) over 3 years ago

  • include/ruby/intern.h: Remove excess semicolons in PUREFUNC(). Fix failure of TestMkmf::TestConvertible on Solaris with Oracle Solaris Studio 12. [ruby-dev:49651] [Bug #12470]
  • internal.h: ditto.

History

#1

Updated by ngoto (Naohisa Goto) over 3 years ago

  • Related to Bug #11644: Since r52055, TestMkmf::TestConvertible failed on Solaris 10 with fcc added

Updated by ngoto (Naohisa Goto) over 3 years ago

  • Description updated (diff)

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED
  • Assignee set to ngoto (Naohisa Goto)
  • Status changed from Open to Assigned
#4

Updated by ngoto (Naohisa Goto) over 3 years ago

  • Status changed from Assigned to Closed

Applied in changeset r55327.


  • include/ruby/intern.h: Remove excess semicolons in PUREFUNC(). Fix failure of TestMkmf::TestConvertible on Solaris with Oracle Solaris Studio 12. [ruby-dev:49651] [Bug #12470]
  • internal.h: ditto.

Also available in: Atom PDF