ruby-changes:28444
From: akr <ko1@a...>
Date: Sat, 27 Apr 2013 19:06:29 +0900 (JST)
Subject: [ruby-changes:28444] akr:r40496 (trunk): * sparc.c: Use __asm__ instead of asm for gcc.
akr 2013-04-27 19:06:20 +0900 (Sat, 27 Apr 2013) New Revision: 40496 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40496 Log: * sparc.c: Use __asm__ instead of asm for gcc. gcc doesn't provide asm keyword if -ansi option is given. http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html Modified files: trunk/ChangeLog trunk/sparc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40495) +++ ChangeLog (revision 40496) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Apr 27 19:04:55 2013 Tanaka Akira <akr@f...> + + * sparc.c: Use __asm__ instead of asm for gcc. + gcc doesn't provide asm keyword if -ansi option is given. + http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html + Sat Apr 27 17:22:50 2013 Tanaka Akira <akr@f...> * ext/socket/extconf.rb: Redundant test removed. Index: sparc.c =================================================================== --- sparc.c (revision 40495) +++ sparc.c (revision 40496) @@ -12,7 +12,16 @@ https://github.com/ruby/ruby/blob/trunk/sparc.c#L12 void rb_sparc_flush_register_windows(void) { - asm +/* + * gcc doesn't provide "asm" keyword if -ansi and the various -std options + * are given. + * http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html + */ +#ifndef __GNUC__ +#define __asm__ asm +#endif + + __asm__ #ifdef __GNUC__ __volatile__ #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/