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

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 $.
https://bugs.ruby-lang.org/issues/8646#change-43875

Author: kanemoto (Yutaka Kanemoto)
Status: Closed
Priority: Normal
Assignee: kanemoto (Yutaka Kanemoto)
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

?????????????????
http://gcc.gnu.org/onlinedocs/gcc/Interoperation.html
??????????説?????????????????
???????????????????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???)??? _ ???????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????
??????????????????????????????????


-- 
http://bugs.ruby-lang.org/