From 5cbc3e15d87eac643a698f72b62d760d9734279c Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 27 Apr 2013 10:06:20 +0000 Subject: * 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sparc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sparc.c') diff --git a/sparc.c b/sparc.c index 5c5dc8ef8e..dc3779035f 100644 --- a/sparc.c +++ b/sparc.c @@ -12,7 +12,16 @@ 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 -- cgit v1.2.3