From: ngotogenome@... Date: 2015-12-15T13:30:13+00:00 Subject: [ruby-dev:49439] [Ruby trunk - Bug #11821] [Open] warning: syntax error: empty declaration in gc.c because of semicolon after RUBY_ALIAS_FUNCTION() Issue #11821 has been reported by Naohisa Goto. ---------------------------------------- Bug #11821: warning: syntax error: empty declaration in gc.c because of semicolon after RUBY_ALIAS_FUNCTION() https://bugs.ruby-lang.org/issues/11821 * Author: Naohisa Goto * Status: Open * Priority: Normal * Assignee: * ruby -v: - * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- 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 からは許容されるようになったという話をどこかで見ました。 -- https://bugs.ruby-lang.org/