[ruby-trunk - misc #8646][Open] Can't compile ruby on AIX using gcc if a function name has $

Issue #8646 has been reported by kanemoto (Yutaka K.).


misc #8646: Can’t compile ruby on AIX using gcc if a function name has
$.

Author: kanemoto (Yutaka K.)
Status: Open
Priority: Normal
Assignee: nobu (Nobuyoshi N.)
Category: build
Target version: current: 2.1.0

r41273で追加されたSafe Levelのチェックの部分で関数名に $ が使われているのですが、AIXのgccでエラーになってしまいます。

% make
(中略)
compiling …/trunk/main.c
In file included from …/trunk/include/ruby.h:33:0,
from …/trunk/main.c:13:
…/trunk/include/ruby/ruby.h:570:1: error: stray ‘$’ in program
int ruby$safe_level$4(void) attribute((error(“$SAFE=4 is
obsolete”)));
^
…/trunk/include/ruby/ruby.h:570:10: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘attribute’ before ‘safe_level’
int ruby$safe_level$4(void) attribute((error(“$SAFE=4 is
obsolete”)));
^
…/trunk/include/ruby/ruby.h:570:10: error: stray ‘$’ in program
make: *** [main.o] Error 1

ここをみると、

最後の行に説明があります。
実際最近のバージョンのgccだと-fdollars-in-identifiersを使うとエラーがなくなるのですが、
先日いくつかAIXに関する報告をしてくれた方(GCCのCompilationFarmを紹介してくれました)に聞いてみると、

If Ruby starts using it in general, there would be problems on AIX and
it would be a bad portability decision by Ruby community.

とのことです。というわけで、2箇所ある ruby$safe_level$4 の $ (合計4つ)を _
あたりに変更させていただいてもよろしいでしょうか?
もしそれでよければこちらでコミットしますのでご一報下さい。
よろしくお願いいたします。

Issue #8646 has been updated by nobu (Nobuyoshi N.).

Status changed from Open to Assigned
Assignee changed from nobu (Nobuyoshi N.) to kanemoto (Yutaka
Kanemoto)

どうぞ。

misc #8646: Can’t compile ruby on AIX using gcc if a function name has
$.

Author: kanemoto (Yutaka K.)
Status: Assigned
Priority: Normal
Assignee: kanemoto (Yutaka K.)
Category: build
Target version: current: 2.1.0

r41273で追加されたSafe Levelのチェックの部分で関数名に $ が使われているのですが、AIXのgccでエラーになってしまいます。

% make
(中略)
compiling …/trunk/main.c
In file included from …/trunk/include/ruby.h:33:0,
from …/trunk/main.c:13:
…/trunk/include/ruby/ruby.h:570:1: error: stray ‘$’ in program
int ruby$safe_level$4(void) attribute((error(“$SAFE=4 is
obsolete”)));
^
…/trunk/include/ruby/ruby.h:570:10: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘attribute’ before ‘safe_level’
int ruby$safe_level$4(void) attribute((error(“$SAFE=4 is
obsolete”)));
^
…/trunk/include/ruby/ruby.h:570:10: error: stray ‘$’ in program
make: *** [main.o] Error 1

ここをみると、

最後の行に説明があります。
実際最近のバージョンのgccだと-fdollars-in-identifiersを使うとエラーがなくなるのですが、
先日いくつかAIXに関する報告をしてくれた方(GCCのCompilationFarmを紹介してくれました)に聞いてみると、

If Ruby starts using it in general, there would be problems on AIX and
it would be a bad portability decision by Ruby community.

とのことです。というわけで、2箇所ある ruby$safe_level$4 の $ (合計4つ)を _
あたりに変更させていただいてもよろしいでしょうか?
もしそれでよければこちらでコミットしますのでご一報下さい。
よろしくお願いいたします。

Issue #8646 has been updated by nobu (Nobuyoshi N.).

Status changed from Assigned to Closed
% Done changed from 0 to 100


misc #8646: Can’t compile ruby on AIX using gcc if a function name has
$.

Author: kanemoto (Yutaka K.)
Status: Closed
Priority: Normal
Assignee: kanemoto (Yutaka K.)
Category: build
Target version: current: 2.1.0

r41273で追加されたSafe Levelのチェックの部分で関数名に $ が使われているのですが、AIXのgccでエラーになってしまいます。

% make
(中略)
compiling …/trunk/main.c
In file included from …/trunk/include/ruby.h:33:0,
from …/trunk/main.c:13:
…/trunk/include/ruby/ruby.h:570:1: error: stray ‘$’ in program
int ruby$safe_level$4(void) attribute((error(“$SAFE=4 is
obsolete”)));
^
…/trunk/include/ruby/ruby.h:570:10: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘attribute’ before ‘safe_level’
int ruby$safe_level$4(void) attribute((error(“$SAFE=4 is
obsolete”)));
^
…/trunk/include/ruby/ruby.h:570:10: error: stray ‘$’ in program
make: *** [main.o] Error 1

ここをみると、

最後の行に説明があります。
実際最近のバージョンのgccだと-fdollars-in-identifiersを使うとエラーがなくなるのですが、
先日いくつかAIXに関する報告をしてくれた方(GCCのCompilationFarmを紹介してくれました)に聞いてみると、

If Ruby starts using it in general, there would be problems on AIX and
it would be a bad portability decision by Ruby community.

とのことです。というわけで、2箇所ある ruby$safe_level$4 の $ (合計4つ)を _
あたりに変更させていただいてもよろしいでしょうか?
もしそれでよければこちらでコミットしますのでご一報下さい。
よろしくお願いいたします。