Patch: no inline when not using gcc
Tom Tromey
tromey@cygnus.com
Mon Aug 9 14:12:00 GMT 1999
gcc/java/javaop.h uses "inline" even when being compiled by compilers
other than gcc. This patch fixes that. I'm checking this in.
1999-08-09 Tom Tromey <tromey@cygnus.com>
* javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
(WORDS_TO_LONG): Likewise.
(WORDS_TO_DOUBLE): Likewise.
Tom
Index: javaop.h
===================================================================
RCS file: /cvs/egcs/egcs/gcc/java/javaop.h,v
retrieving revision 1.4
diff -u -r1.4 javaop.h
--- javaop.h 1999/02/01 07:00:38 1.4
+++ javaop.h 1999/08/09 21:08:21
@@ -102,14 +102,20 @@
| (BCODE[PC-2] << 8) | (BCODE[PC-1]))))
#endif
-static inline jfloat
+#ifdef __GNUC__
+__inline
+#endif
+static jfloat
WORD_TO_FLOAT(jword w)
{ union Word wu;
wu.i = w;
return wu.f;
}
-static inline jlong
+#ifdef __GNUC__
+__inline
+#endif
+static jlong
WORDS_TO_LONG(jword hi, jword lo)
{
return ((jlong) hi << 32) | ((jlong)lo & (((jlong)1 << 32) -1));
@@ -121,7 +127,10 @@
jword w[2];
};
-static inline jdouble
+#ifdef __GNUC__
+__inline
+#endif
+static jdouble
WORDS_TO_DOUBLE(jword hi, jword lo)
{ union DWord wu;
wu.l = WORDS_TO_LONG(hi, lo);
More information about the Gcc-patches
mailing list