Project

General

Profile

Bug #11821

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

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

Status:
Closed
Priority:
Normal
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 からは許容されるようになったという話をどこかで見ました。

Associated revisions

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

  • 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().

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

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

  • 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().

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

  • 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().

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

  • 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().

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

  • 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().

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

  • 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().

History

#1

Updated by ngoto (Naohisa Goto) over 3 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().

Also available in: Atom PDF