summaryrefslogtreecommitdiff
path: root/sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sparc.c')
-rw-r--r--sparc.c11
1 files changed, 10 insertions, 1 deletions
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