Patch: warnings from interpret.cc

Tom Tromey tromey@cygnus.com
Mon Feb 7 16:17:00 GMT 2000


I'm checking in the appended patch, which eliminates a lot of spurious
warnings from the interpret.cc compilation.

2000-02-07  Tom Tromey  <tromey@cygnus.com>

	* interpret.cc (PUSHL): Don't use expression statement.
	(PUSHD): Likewise.
	(LOADL): Likewise.
	(STOREL): Likewise.

Tom

Index: interpret.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/interpret.cc,v
retrieving revision 1.9
diff -u -r1.9 interpret.cc
--- interpret.cc	2000/01/26 00:56:36	1.9
+++ interpret.cc	2000/02/08 00:14:11
@@ -87,12 +87,12 @@
 #define PUSHA(V)  (sp++)->o = (V)
 #define PUSHI(V)  (sp++)->i = (V)
 #define PUSHF(V)  (sp++)->f = (V)
-#define PUSHL(V)  ({ _Jv_word2 w2; w2.l=(V); \
+#define PUSHL(V)  do { _Jv_word2 w2; w2.l=(V); \
                      (sp++)->ia[0] = w2.ia[0]; \
-                     (sp++)->ia[0] = w2.ia[1]; })
-#define PUSHD(V)  ({ _Jv_word2 w2; w2.d=(V); \
+                     (sp++)->ia[0] = w2.ia[1]; } while (0)
+#define PUSHD(V)  do { _Jv_word2 w2; w2.d=(V); \
                      (sp++)->ia[0] = w2.ia[0]; \
-                     (sp++)->ia[0] = w2.ia[1]; })
+                     (sp++)->ia[0] = w2.ia[1]; } while (0)
 
 #define POPA()    ((--sp)->o)
 #define POPI()    ((jint) (--sp)->i) // cast since it may be promoted
@@ -107,20 +107,20 @@
 #define LOADA(I)  (sp++)->o = locals[I].o
 #define LOADI(I)  (sp++)->i = locals[I].i
 #define LOADF(I)  (sp++)->f = locals[I].f
-#define LOADL(I)  ({ jint __idx = (I); \
+#define LOADL(I)  do { jint __idx = (I); \
     (sp++)->ia[0] = locals[__idx].ia[0]; \
     (sp++)->ia[0] = locals[__idx+1].ia[0]; \
- })
+ } while (0)
 #define LOADD(I)  LOADL(I)
 
 
 #define STOREA(I) locals[I].o = (--sp)->o
 #define STOREI(I) locals[I].i = (--sp)->i
 #define STOREF(I) locals[I].f = (--sp)->f
-#define STOREL(I) ({ jint __idx = (I); \
+#define STOREL(I) do { jint __idx = (I); \
     locals[__idx+1].ia[0] = (--sp)->ia[0]; \
     locals[__idx].ia[0] = (--sp)->ia[0]; \
- })
+ } while (0)
 #define STORED(I) STOREL(I)
 
 #define PEEKI(I)  (locals+(I))->i


More information about the Java-patches mailing list