Add funny do{}while(0) protection to LOGCONDITIONAL macro.
authorOrion Lawlor <olawlor@acm.org>
Sat, 30 Aug 2003 02:41:13 +0000 (02:41 +0000)
committerOrion Lawlor <olawlor@acm.org>
Sat, 30 Aug 2003 02:41:13 +0000 (02:41 +0000)
This lets LOGCONDITIONAL be used properly inside an "if"
statement (before it might screw up a subseqent "else").

src/conv-perf/traceCoreAPI.h

index 7bd66c4e8297662a7cc9add0bbcfb1fe04a8614f..7adf604b3130d54cd55caf4c8fc6f68bdef70f96 100644 (file)
@@ -10,10 +10,11 @@ CpvExtern(int,_traceCoreOn);
 #ifdef CMK_OPTIMIZE
 #define LOGCONDITIONAL(x) 
 #else 
-#define LOGCONDITIONAL(x) \
+#define LOGCONDITIONAL(x) do { \
                if(CpvAccess(_traceCoreOn)!=0){ \
                        x;\
                }
+       } while(0);
 #endif
 
 void RegisterLanguage(int lID, char* ln);