Index: libpolys/polys/ext_fields/algext.cc
===================================================================
--- libpolys/polys/ext_fields/algext.cc	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/ext_fields/algext.cc	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -61,5 +61,5 @@
 BOOLEAN  naDBTest(number a, const char *f, const int l, const coeffs r);
 #else
-#define naTest(a) ((void)(TRUE))
+#define naTest(a) do {} while (0)
 #endif
 
Index: libpolys/polys/ext_fields/transext.cc
===================================================================
--- libpolys/polys/ext_fields/transext.cc	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/ext_fields/transext.cc	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -84,5 +84,5 @@
 BOOLEAN  ntDBTest(number a, const char *f, const int l, const coeffs r);
 #else
-#define ntTest(a) ((void)(TRUE))
+#define ntTest(a) do {} while (0)
 #endif
 
Index: libpolys/polys/kbuckets.h
===================================================================
--- libpolys/polys/kbuckets.h	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/kbuckets.h	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -157,5 +157,5 @@
 BOOLEAN kbTest(kBucket_pt bucket);
 #else
-#define kbTest(bucket)  ((void)0)
+#define kbTest(bucket)  do {} while (0)
 #endif
 
Index: libpolys/polys/monomials/monomials.h
===================================================================
--- libpolys/polys/monomials/monomials.h	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/monomials/monomials.h	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -150,18 +150,18 @@
 //void p_SetRingOfLeftv(leftv l, ring r);
 #else
-#define p_SetRingOfLm(p, r) ((void)0)
-//#define p_SetRingOfLeftv(l, r) ((void)0)
+#define p_SetRingOfLm(p, r) do {} while (0)
+//#define p_SetRingOfLeftv(l, r) do {} while (0)
 #endif
 
 #else // ! defined(PDEBUG)
-#define pFalseReturn(cond)           ((void)0)
-#define pAssume(cond)                ((void)0)
-#define pPolyAssume(cond)            ((void)0)
-#define _pPolyAssume(cond, p,r)      ((void)0)
-#define pAssumeReturn(cond)          ((void)0)
-#define pPolyAssumeReturn(cond)      ((void)0)
-#define _pPolyAssumeReturn(cond,p,r) ((void)0)
-#define p_SetRingOfLm(p, r)          ((void)0)
-//#define p_SetRingOfLeftv(l, r)       ((void)0)
+#define pFalseReturn(cond)           do {} while (0)
+#define pAssume(cond)                do {} while (0)
+#define pPolyAssume(cond)            do {} while (0)
+#define _pPolyAssume(cond, p,r)      do {} while (0)
+#define pAssumeReturn(cond)          do {} while (0)
+#define pPolyAssumeReturn(cond)      do {} while (0)
+#define _pPolyAssumeReturn(cond,p,r) do {} while (0)
+#define p_SetRingOfLm(p, r)          do {} while (0)
+//#define p_SetRingOfLeftv(l, r)       do {} while (0)
 #endif // defined(PDEBUG)
 
@@ -177,13 +177,13 @@
 #define pIfThen1          pIfThen
 #else
-#define pAssume1(cond)               ((void)0)
-#define pPolyAssume1(cond)           ((void)0)
-#define _pPolyAssume1(cond,p,r)      ((void)0)
-#define pAssumeReturn1(cond)         ((void)0)
-#define pPolyAssumeReturn1(cond)     ((void)0)
-#define _pPolyAssumeReturn1(cond,p,r)((void)0)
-#define p_LmCheckPolyRing1(p,r)       ((void)0)
-#define p_CheckRing1(r)             ((void)0)
-#define pIfThen1(cond, check)     ((void)0)
+#define pAssume1(cond)               do {} while (0)
+#define pPolyAssume1(cond)           do {} while (0)
+#define _pPolyAssume1(cond,p,r)      do {} while (0)
+#define pAssumeReturn1(cond)         do {} while (0)
+#define pPolyAssumeReturn1(cond)     do {} while (0)
+#define _pPolyAssumeReturn1(cond,p,r)do {} while (0)
+#define p_LmCheckPolyRing1(p,r)       do {} while (0)
+#define p_CheckRing1(r)             do {} while (0)
+#define pIfThen1(cond, check)     do {} while (0)
 #endif // PDEBUG >= 1
 
@@ -199,13 +199,13 @@
 #define pIfThen2          pIfThen
 #else
-#define pAssume2(cond)               ((void)0)
-#define pPolyAssume2(cond)           ((void)0)
-#define _pPolyAssume2(cond,p,r)      ((void)0)
-#define pAssumeReturn2(cond)         ((void)0)
-#define pPolyAssumeReturn2(cond)     ((void)0)
-#define _pPolyAssumeReturn2(cond,p,r)((void)0)
-#define p_LmCheckPolyRing2(p,r)       ((void)0)
-#define p_CheckRing2(r)             ((void)0)
-#define pIfThen2(cond, check)     ((void)0)
+#define pAssume2(cond)               do {} while (0)
+#define pPolyAssume2(cond)           do {} while (0)
+#define _pPolyAssume2(cond,p,r)      do {} while (0)
+#define pAssumeReturn2(cond)         do {} while (0)
+#define pPolyAssumeReturn2(cond)     do {} while (0)
+#define _pPolyAssumeReturn2(cond,p,r)do {} while (0)
+#define p_LmCheckPolyRing2(p,r)       do {} while (0)
+#define p_CheckRing2(r)             do {} while (0)
+#define pIfThen2(cond, check)     do {} while (0)
 #endif // PDEBUG >= 2
 
Index: libpolys/polys/monomials/p_polys.cc
===================================================================
--- libpolys/polys/monomials/p_polys.cc	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/monomials/p_polys.cc	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -4241,5 +4241,5 @@
 #define p_Delete__T p_ShallowDelete
 #undef n_Delete__T
-#define n_Delete__T(n, r) ((void)0)
+#define n_Delete__T(n, r) do {} while (0)
 
 #include <polys/templates/p_Delete__T.cc>
Index: libpolys/polys/monomials/p_polys.h
===================================================================
--- libpolys/polys/monomials/p_polys.h	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/monomials/p_polys.h	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -154,14 +154,14 @@
 #define pIsMonomOf(p, q)        (TRUE)
 #define pHaveCommonMonoms(p, q) (TRUE)
-#define p_LmCheckIsFromRing(p,r)  ((void)0)
-#define p_LmCheckPolyRing(p,r)    ((void)0)
-#define p_CheckIsFromRing(p,r)  ((void)0)
-#define p_CheckPolyRing(p,r)    ((void)0)
-#define p_CheckRing(r)          ((void)0)
-#define P_CheckIf(cond, check)  ((void)0)
-
-#define p_Test(p,r)     ((void) 1)
-#define p_LmTest(p,r)   ((void) 1)
-#define pp_Test(p, lmRing, tailRing) ((void) 1)
+#define p_LmCheckIsFromRing(p,r)  do {} while (0)
+#define p_LmCheckPolyRing(p,r)    do {} while (0)
+#define p_CheckIsFromRing(p,r)  do {} while (0)
+#define p_CheckPolyRing(p,r)    do {} while (0)
+#define p_CheckRing(r)          do {} while (0)
+#define P_CheckIf(cond, check)  do {} while (0)
+
+#define p_Test(p,r)     do {} while (0)
+#define p_LmTest(p,r)   do {} while (0)
+#define pp_Test(p, lmRing, tailRing) do {} while (0)
 
 #endif
@@ -1192,5 +1192,5 @@
 #endif
 
-#define pDivAssume(x)   ((void)0)
+#define pDivAssume(x)   do {} while (0)
 
 
Index: libpolys/polys/prCopyMacros.h
===================================================================
--- libpolys/polys/prCopyMacros.h	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/prCopyMacros.h	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -9,5 +9,5 @@
 while (0)
 #else
-#define PR_DELETE_MONOM(src, r_src) ((void)0)
+#define PR_DELETE_MONOM(src, r_src) do {} while (0)
 #endif
 
@@ -18,5 +18,5 @@
 #undef PR_NO_SORT
 #define PR_NO_SORT 1
-#define PR_INIT_EVECTOR_COPY(r_src, r_dest) ((void)0)
+#define PR_INIT_EVECTOR_COPY(r_src, r_dest) do {} while (0)
 #define PR_CPY_EVECTOR(dest, dest_r, src, src_r) \
   omMemcpyW(dest->exp, src->exp, dest_r->ExpL_Size)
@@ -36,5 +36,5 @@
 #if PR_NUMBER_SIMPLE > 0
 #define PR_NCOPY(n, r) n
-#define PR_NDELETE(n, r) ((void)0)
+#define PR_NDELETE(n, r) do {} while (0)
 #define PR_NUMBER_SIMPLE_NAME NSimple
 #else
@@ -46,5 +46,5 @@
 #undef PR_SORT_POLY
 #if PR_NO_SORT > 0
-#define PR_SORT_POLY(p, d_r, s_r) ((void)0)
+#define PR_SORT_POLY(p, d_r, s_r) do {} while (0)
 #else
 #define PR_SORT_POLY(p, d_r, s_r) p = p_SortMerge(p, d_r, d_r->OrdSgn == s_r->OrdSgn)
Index: libpolys/polys/simpleideals.h
===================================================================
--- libpolys/polys/simpleideals.h	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/simpleideals.h	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -67,6 +67,6 @@
 // #define id_Print(id, r) id_Show(id, r)
 #else
-#define id_Test(A, r)  ((void)(TRUE))
-// #define id_Print(A, r) ((void)0)
+#define id_Test(A, r)  do {} while (0)
+// #define id_Print(A, r) do {} while (0)
 #endif
 
Index: libpolys/polys/templates/p_Numbers.h
===================================================================
--- libpolys/polys/templates/p_Numbers.h	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/templates/p_Numbers.h	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -62,5 +62,5 @@
 #include <coeffs/modulop.h>
 #define n_Copy_FieldZp(n, r)        n
-#define n_Delete_FieldZp(n, r)      ((void)0)
+#define n_Delete_FieldZp(n, r)      do {} while (0)
 #define n_Mult_FieldZp(n1, n2, r)   npMultM(n1,n2, r->cf)
 #define n_Add_FieldZp(n1, n2, r)    npAddM(n1, n2, r->cf)
Index: libpolys/polys/templates/p_Procs_Generate.cc
===================================================================
--- libpolys/polys/templates/p_Procs_Generate.cc	(revision 538512de5ab210253d8edeee07e4a22b42392e56)
+++ libpolys/polys/templates/p_Procs_Generate.cc	(revision d101b165f063c8f437a101b437baa6095a596422)
@@ -151,6 +151,6 @@
   if (length != LengthGeneral)
   {
-    printf("#define DECLARE_LENGTH(what) ((void)0)\n");
-    printf("#define p_MemAddAdjust__T(p, r) ((void)0)\n");
+    printf("#define DECLARE_LENGTH(what) do {} while (0)\n");
+    printf("#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
   }
   else
@@ -160,5 +160,5 @@
       printf("#define p_MemAddAdjust__T(p, r) p_MemAdd_NegWeightAdjust(p, r)\n");
     else
-      printf("#define p_MemAddAdjust__T(p, r) ((void)0)\n");
+      printf("#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
   }
 
@@ -166,5 +166,5 @@
   printf("#undef DECLARE_ORDSGN\n");
   if (ord != OrdGeneral)
-    printf("#define DECLARE_ORDSGN(what) ((void)0)\n");
+    printf("#define DECLARE_ORDSGN(what) do {} while (0)\n");
   else
     printf("#define DECLARE_ORDSGN(what) what\n");
@@ -176,5 +176,5 @@
     if (length != LengthGeneral)
     {
-      printf("#define DECLARE_LENGTH_2(what) ((void)0)\n");
+      printf("#define DECLARE_LENGTH_2(what) do {} while (0)\n");
       if (length < LengthTwo)
         printf("#define p_MemCmp_Bitmask_2 p_MemCmp_Bitmask_%s\n", p_LengthEnum_2_String((p_Length) ((int) length + 2)));
@@ -190,5 +190,5 @@
 
     printf("#undef p_MemAddAdjust__T\n");
-    printf("#define p_MemAddAdjust__T(p, r) ((void)0)\n");
+    printf("#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
   }
 
