Project

General

Profile

Actions

Bug #11821

closed

warning: syntax error: empty declaration in gc.c because of semicolon after RUBY_ALIAS_FUNCTION()

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

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:49439]

Description

Oracle Solaris Studio 12.x にて gc.c のコンパイル時に、以下のwarningが出ます。

cc -errtags=yes  -xO4 -xtarget=sparc64viiplus -m64 -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. -o gc.o -c gc.c
"gc.c", line 1922: warning: syntax error:  empty declaration (E_EMPTY_DECLARATION)
"gc.c", line 1943: warning: syntax error:  empty declaration (E_EMPTY_DECLARATION)

RUBY_ALIAS_FUNCTION() の行の最後に存在する ; (セミコロン)が余計で、これが原因でこの warning が出ているようです。

なお、原典に当たっていないので不明ですが、C++11 からは許容されるようになったという話をどこかで見ました。

Actions #1

Updated by ngoto (Naohisa Goto) over 8 years ago

  • Status changed from Open to Closed

Applied in changeset r53129.


  • gc.c: Delete excess semicolon after RUBY_ALIAS_FUNCTION().
    Suppress "syntax error: empty declaration" warnings by
    Oracle Solaris Studio 12.x on Solaris. [Bug #11821]

  • hash.c: ditto, after NOINSERT_UPDATE_CALLBACK().

Actions

Also available in: Atom PDF

Like0
Like0