From 3af2cde18b3aabed4c808b0113daa81c2263b0bd Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Mon, 19 Oct 2020 10:36:57 +0200 Subject: [PATCH] Replace unused macro with cl_unused. It has become customary to use 'unused' within bitfields. Better avoid this conflict. This fixes cross-compilation issues on several ARM-based host platforms. --- src/base/cl_low.h | 76 ++++++++++---------- src/base/cl_macros.h | 8 +-- src/base/digitseq/cl_DS.h | 8 +-- src/base/digitseq/cl_DS_mul_fftm.h | 10 +-- src/base/digitseq/cl_DS_mul_nuss.h | 2 +- src/base/hash/cl_hash.h | 2 +- src/base/ring/cl_no_ring.cc | 20 +++--- src/base/symbol/cl_symbol.cc | 2 +- src/complex/cl_C.h | 4 +- src/complex/input/cl_N_read.cc | 4 +- src/complex/ring/cl_C_ring.cc | 8 +-- src/complex/transcendental/cl_C_expt_C.cc | 2 +- src/float/dfloat/cl_DF.h | 4 +- src/float/dfloat/misc/cl_DF_digits.cc | 2 +- src/float/ffloat/cl_FF.h | 4 +- src/float/ffloat/misc/cl_FF_digits.cc | 2 +- src/float/input/cl_F_read.cc | 2 +- src/float/lfloat/cl_LF_impl.h | 6 +- src/float/sfloat/cl_SF.h | 4 +- src/float/sfloat/misc/cl_SF_digits.cc | 2 +- src/float/transcendental/cl_LF_ratseries_.cc | 2 +- src/integer/cl_I.h | 28 ++++---- src/integer/ring/cl_0_ring.cc | 28 ++++---- src/integer/ring/cl_I_ring.cc | 8 +-- src/modinteger/cl_MI.cc | 2 +- src/modinteger/cl_MI_int.h | 10 +-- src/modinteger/cl_MI_std.h | 4 +- src/polynomial/elem/cl_UP_GF2.h | 4 +- src/polynomial/elem/cl_UP_MI.h | 4 +- src/polynomial/elem/cl_UP_gen.h | 4 +- src/polynomial/elem/cl_UP_no_ring.cc | 52 +++++++------- src/polynomial/elem/cl_UP_number.h | 4 +- src/rational/cl_RA.h | 8 +-- src/rational/ring/cl_RA_ring.cc | 8 +-- src/real/input/cl_R_read.cc | 2 +- src/real/ring/cl_R_ring.cc | 8 +-- src/vector/cl_GV_I.cc | 2 +- src/vector/cl_GV_number_debug.cc | 4 +- src/vector/cl_SV_number_debug.cc | 4 +- 39 files changed, 179 insertions(+), 179 deletions(-) diff --git a/src/base/cl_low.h b/src/base/cl_low.h index ee47bf1..8d09424 100644 --- a/src/base/cl_low.h +++ b/src/base/cl_low.h @@ -161,7 +161,7 @@ inline uint32 mulu16 (uint16 arg1, uint16 arg2) var union { double f; uint32 i[2]; uint16 s[4]; } __fi; \ __fi.f = (double)(sint32)(_x)*(double)(sint32)(_y) \ + (double)(4503599627370496.0L); /* + 2^52, zum Normalisieren */\ - unused (hi_zuweisung __fi.s[1]); /* mittlere 16 Bit herausholen, (benutzt CL_CPU_BIG_ENDIAN_P !) */\ + cl_unused (hi_zuweisung __fi.s[1]); /* mittlere 16 Bit herausholen, (benutzt CL_CPU_BIG_ENDIAN_P !) */\ lo_zuweisung __fi.i[1]; /* untere 32 Bit herausholen (benutzt CL_CPU_BIG_ENDIAN_P !) */\ } #else @@ -212,7 +212,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) var uint32 _hi; \ var uint32 _lo; \ __asm__("mulul %3,%0:%1" : "=d" (_hi), "=d"(_lo) : "1" (_x), "dm" (_y) ); \ - unused (hi_zuweisung _hi); \ + cl_unused (hi_zuweisung _hi); \ lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__m68k__) @@ -233,7 +233,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) _hi += high16(_mid); _mid = highlow32_0(low16(_mid)); \ _lo += _mid; if (_lo < _mid) { _hi += 1; } /* 64-Bit-Addition */\ } \ - unused (hi_zuweisung _hi); \ + cl_unused (hi_zuweisung _hi); \ lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) @@ -243,20 +243,20 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=r" (_prod) \ : "r" ((uint32)(x)), "r" ((uint32)(y)) \ ); \ - unused (hi_zuweisung (uint32)(_prod>>32)); \ + cl_unused (hi_zuweisung (uint32)(_prod>>32)); \ lo_zuweisung (uint32)(_prod); \ }) #elif defined(__GNUC__) && defined(__sparc__) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ lo_zuweisung mulu32_(x,y); /* extern in Assembler */ \ {var register uint32 _hi __asm__("%g1"); \ - unused (hi_zuweisung _hi); \ + cl_unused (hi_zuweisung _hi); \ }}) #elif defined(__GNUC__) && defined(__arm__) && 0 // see comment cl_asm_arm.cc #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ lo_zuweisung mulu32_(x,y); /* extern in Assembler */ \ {var register uint32 _hi __asm__("%r1"/*"%a2"*/); \ - unused (hi_zuweisung _hi); \ + cl_unused (hi_zuweisung _hi); \ }}) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ @@ -266,7 +266,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=d" /* %edx */ (_hi), "=a" /* %eax */ (_lo) \ : "g" ((uint32)(x)), "1" /* %eax */ ((uint32)(y)) \ ); \ - unused (hi_zuweisung _hi); lo_zuweisung _lo; \ + cl_unused (hi_zuweisung _hi); lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__mips__) && !defined(NO_ASM) #if __mips_isa_rev >= 6 @@ -281,12 +281,12 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=r" (_hi), "=r" (_lo) \ : "r" ((uint32)(x)), "r" ((uint32)(y)) \ ); \ - unused (hi_zuweisung _hi); lo_zuweisung _lo; \ + cl_unused (hi_zuweisung _hi); lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && !defined(__arm__) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint64 _prod = (uint64)(uint32)(x) * (uint64)(uint32)(y); \ - unused (hi_zuweisung (uint32)(_prod>>32)); \ + cl_unused (hi_zuweisung (uint32)(_prod>>32)); \ lo_zuweisung (uint32)(_prod); \ }) #elif defined(WATCOM) && defined(__i386__) && !defined(NO_ASM) @@ -294,14 +294,14 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) { var register uint32 _hi; \ var register uint32 _lo; \ _lo = mulu32_(x,y), _hi = mulu32_high_(); \ - unused (hi_zuweisung _hi); lo_zuweisung _lo; \ + cl_unused (hi_zuweisung _hi); lo_zuweisung _lo; \ } extern "C" uint32 mulu32_high_ (void); #pragma aux mulu32_ = 0xF7 0xE2 /* mull %edx */ parm [eax] [edx] value [eax] modify [eax edx]; #pragma aux mulu32_high_ = /* */ value [edx] modify []; #else #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ - { lo_zuweisung mulu32_(x,y); unused (hi_zuweisung mulu32_high); } + { lo_zuweisung mulu32_(x,y); cl_unused (hi_zuweisung mulu32_high); } #if (defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__x86_64__) || defined(__mips__) || defined(__hppa__)) && !defined(NO_ASM) // mulu32_ extern in Assembler #if defined(__sparc__) || defined(__sparc64__) @@ -363,14 +363,14 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=r" (_hi) \ : "r" (_x), "r" (_y) \ ); \ - unused (hi_zuweisung _hi); \ + cl_unused (hi_zuweisung _hi); \ lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ ({ lo_zuweisung mulu64_(x,y); /* extern in Assembler */ \ {var register uint64 _hi __asm__("%g2"); \ - unused (hi_zuweisung _hi); \ + cl_unused (hi_zuweisung _hi); \ }}) #elif defined(__GNUC__) && defined(__x86_64__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ @@ -380,7 +380,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=d" /* %rdx */ (_hi), "=a" /* %rax */ (_lo) \ : "rm" ((uint64)(x)), "1" /* %rax */ ((uint64)(y)) \ ); \ - unused (hi_zuweisung _hi); lo_zuweisung _lo; \ + cl_unused (hi_zuweisung _hi); lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__ia64__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ @@ -391,11 +391,11 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=f" (_hi) \ : "f" ((uint64)(_x)), "f" ((uint64)(_y)) \ ); \ - unused (hi_zuweisung _hi); lo_zuweisung ((uint64)(_x)*(uint64)(_y)); \ + cl_unused (hi_zuweisung _hi); lo_zuweisung ((uint64)(_x)*(uint64)(_y)); \ }) #else #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ - { lo_zuweisung mulu64_(x,y); unused (hi_zuweisung mulu64_high); } + { lo_zuweisung mulu64_(x,y); cl_unused (hi_zuweisung mulu64_high); } #if defined(__sparc64__) && !defined(NO_ASM) // mulu64_ extern in Assembler extern "C" uint64 _get_g2 (void); @@ -456,13 +456,13 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) "sub %2,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__x), "r" (__y)); \ - unused (q_zuweisung (uint16)__q); \ + cl_unused (q_zuweisung (uint16)__q); \ r_zuweisung (uint16)__r; \ }) #elif defined(__GNUC__) && (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({ var uint32 __qr = divu_3216_1616_(x,y); /* extern in Assembler */\ - unused (q_zuweisung low16(__qr)); \ + cl_unused (q_zuweisung low16(__qr)); \ r_zuweisung high16(__qr); \ }) #elif defined(__GNUC__) && defined(__m68k__) && !defined(NO_ASM) @@ -473,7 +473,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) __asm__ __volatile__ (" \ divu %2,%0 \ " : "=d" (__qr) : "0" (__x), "dm" (__y)); \ - unused (q_zuweisung low16(__qr)); \ + cl_unused (q_zuweisung low16(__qr)); \ r_zuweisung high16(__qr); \ }) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(NO_ASM) @@ -486,38 +486,38 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=a" /* %ax */ (__q), "=d" /* %dx */ (__r) \ : "1" /* %dx */ ((uint16)(high16(__x))), "0" /* %ax */ ((uint16)(low16(__x))), "rm" (__y) \ ); \ - unused (q_zuweisung __q); \ + cl_unused (q_zuweisung __q); \ r_zuweisung __r; \ }) #elif defined(__GNUC__) && defined(__arm__) && 0 // see comment cl_asm_arm.cc #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { var uint32 __q = divu_3216_1616_(x,y); /* extern in Assembler */ \ var register uint32 __r __asm__("%r1"/*"%a2"*/); \ - unused (q_zuweisung __q); r_zuweisung __r; \ + cl_unused (q_zuweisung __q); r_zuweisung __r; \ } #elif defined(__GNUC__) && !defined(__arm__) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({var uint32 __x = (x); \ var uint16 __y = (y); \ var uint16 __q = floor(__x,__y); \ - unused (q_zuweisung __q); \ + cl_unused (q_zuweisung __q); \ r_zuweisung (__x - __q * __y); \ }) #elif (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { var uint32 __qr = divu_3216_1616_(x,y); /* extern in Assembler */ \ - unused (q_zuweisung low16(__qr)); \ + cl_unused (q_zuweisung low16(__qr)); \ r_zuweisung high16(__qr); \ } #elif defined(__arm__) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ - { unused (q_zuweisung divu_3216_1616_(x,y)); /* extern in Assembler */ \ + { cl_unused (q_zuweisung divu_3216_1616_(x,y)); /* extern in Assembler */ \ r_zuweisung divu_16_rest; \ } #define NEED_VAR_divu_16_rest #else #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ - { unused (q_zuweisung divu_3216_1616_(x,y)); r_zuweisung divu_16_rest; } + { cl_unused (q_zuweisung divu_3216_1616_(x,y)); r_zuweisung divu_16_rest; } #define NEED_FUNCTION_divu_3216_1616_ #endif @@ -704,7 +704,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) __asm__ __volatile__ (" \ divul %4,%1:%0 \ " : "=d" (__q), "=d" (__r) : "1" (__xhi), "0" (__xlo), "dm" (__y)); \ - unused (q_zuweisung __q); \ + cl_unused (q_zuweisung __q); \ r_zuweisung __r; \ }) #define divu_6432_3232_(xhi,xlo,y) \ @@ -723,20 +723,20 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) "sub %3,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__xhi), "r" (__xlo), "r" (__y)); \ - unused (q_zuweisung (uint32)__q); \ + cl_unused (q_zuweisung (uint32)__q); \ r_zuweisung (uint32)__r; \ }) #elif defined(__GNUC__) && (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({ var uint32 _q = divu_6432_3232_(xhi,xlo,y); /* extern in Assembler */\ var register uint32 _r __asm__("%g1"); \ - unused (q_zuweisung _q); r_zuweisung _r; \ + cl_unused (q_zuweisung _q); r_zuweisung _r; \ }) #elif defined(__GNUC__) && defined(__arm__) && 0 // see comment cl_asm_arm.cc #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({ var uint32 _q = divu_6432_3232_(xhi,xlo,y); /* extern in Assembler */\ var register uint32 _r __asm__("%r1"/*"%a2"*/); \ - unused (q_zuweisung _q); r_zuweisung _r; \ + cl_unused (q_zuweisung _q); r_zuweisung _r; \ }) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(NO_ASM) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ @@ -750,7 +750,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) : "=a" /* %eax */ (__q), "=d" /* %edx */ (__r) \ : "1" /* %edx */ (__xhi), "0" /* %eax */ (__xlo), "rm" (__y) \ ); \ - unused (q_zuweisung __q); \ + cl_unused (q_zuweisung __q); \ r_zuweisung __r; \ }) #define divu_6432_3232_(xhi,xlo,y) \ @@ -762,7 +762,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) var uint64 __x = ((uint64)__xhi << 32) | (uint64)__xlo; \ var uint32 __y = (y); \ var uint32 __q = floor(__x,(uint64)__y); \ - unused (q_zuweisung __q); r_zuweisung __xlo - __q * __y; \ + cl_unused (q_zuweisung __q); r_zuweisung __xlo - __q * __y; \ }) #define divu_6432_3232_(xhi,xlo,y) \ ({var uint32 ___q; divu_6432_3232(xhi,xlo,y,___q=,); ___q; }) @@ -774,7 +774,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) var uint32 __q; \ var uint32 __r; \ __q = divu_6432_3232_(__xhi,__xlo,__y); __r = divu_6432_3232_rest(); \ - unused (q_zuweisung __q); \ + cl_unused (q_zuweisung __q); \ r_zuweisung __r; \ } extern "C" uint32 divu_6432_3232_rest (void); @@ -782,7 +782,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) #pragma aux divu_6432_3232_rest = /* */ value [edx] modify []; #else #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ - { unused (q_zuweisung divu_6432_3232_(xhi,xlo,y)); r_zuweisung divu_32_rest; } + { cl_unused (q_zuweisung divu_6432_3232_(xhi,xlo,y)); r_zuweisung divu_32_rest; } #if (defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__x86_64__) || defined(__hppa__)) && !defined(NO_ASM) // divu_6432_3232_ extern in Assembler #if defined(__sparc__) || defined(__sparc64__) @@ -1057,10 +1057,10 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) { var uint16 _z; \ var uint16 _r; \ if (_x1 >= _y) /* Division _x/_y ergäbe Überlauf -> _z > _y */\ - { unused (sqrtp_zuweisung FALSE); break; } \ + { cl_unused (sqrtp_zuweisung FALSE); break; } \ divu_3216_1616(_x,_y, _z=,_r=); /* Dividiere _x/_y */ \ if (_z >= _y) \ - { unused (sqrtp_zuweisung (_z == _y) && (_r == 0)); break; } \ + { cl_unused (sqrtp_zuweisung (_z == _y) && (_r == 0)); break; } \ _y = floor((uint16)(_z+_y),2) | bit(16-1); /* _y muß >= 2^15 bleiben */\ } \ y_zuweisung _y; \ @@ -1158,12 +1158,12 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) /* Rest := Rest + 2^17*yhi = xlo + 2^17*yhi >= 2^32 > z, also x>y^2. */\ if (_r < bit(15)) \ { if (_xlo < _z) \ - { _ylo -= 1; unused (sqrtp_zuweisung FALSE); } \ + { _ylo -= 1; cl_unused (sqrtp_zuweisung FALSE); } \ else \ - { unused (sqrtp_zuweisung (_xlo == _z)); } \ + { cl_unused (sqrtp_zuweisung (_xlo == _z)); } \ } \ else \ - { unused (sqrtp_zuweisung FALSE); } \ + { cl_unused (sqrtp_zuweisung FALSE); } \ y_zuweisung highlow32(_yhi,_ylo); \ }} #endif diff --git a/src/base/cl_macros.h b/src/base/cl_macros.h index 30b819c..4b4ba0d 100644 --- a/src/base/cl_macros.h +++ b/src/base/cl_macros.h @@ -65,11 +65,11 @@ #define TRUE 1 // Ignore a value (instead of assigning it to a variable). -// unused ... +// cl_unused ... #if defined(__GNUC__) || defined(__KCC) // avoid a gcc warning "statement with no effect" - #define unused (void) + #define cl_unused (void) #else - #define unused + #define cl_unused #endif // Denotes a point where control flow can never arrive. @@ -246,7 +246,7 @@ /* Ability to place an object at a given address. */ \ public: \ void* operator new (size_t size) { return malloc_hook(size); } \ - void* operator new (size_t size, classname* ptr) { unused size; return ptr; } \ + void* operator new (size_t size, classname* ptr) { cl_unused size; return ptr; } \ void operator delete (void* ptr) { free_hook(ptr); } // init1(type, object) (value); diff --git a/src/base/digitseq/cl_DS.h b/src/base/digitseq/cl_DS.h index 9543023..a4389cc 100644 --- a/src/base/digitseq/cl_DS.h +++ b/src/base/digitseq/cl_DS.h @@ -2495,12 +2495,12 @@ inline uintD divucopy_loop_down (uintD digit, const uintD* sourceptr, uintD* des #define num_stack_array(need,low_zuweisung,high_zuweisung) \ {var uintC __need = (uintC)(need); \ var uintD* __array = cl_alloc_array(uintD,__need); \ - unused (low_zuweisung &__array[0]); unused (high_zuweisung &__array[__need]); \ + cl_unused (low_zuweisung &__array[0]); cl_unused (high_zuweisung &__array[__need]); \ } #define num_stack_small_array(need,low_zuweisung,high_zuweisung) \ {var uintC __need = (uintC)(need); \ var uintD* __array = cl_small_alloc_array(uintD,__need); \ - unused (low_zuweisung &__array[0]); unused (high_zuweisung &__array[__need]); \ + cl_unused (low_zuweisung &__array[0]); cl_unused (high_zuweisung &__array[__need]); \ } #if CL_DS_BIG_ENDIAN_P #define num_stack_alloc(need,MSDptr_zuweisung,LSDptr_zuweisung) \ @@ -2591,7 +2591,7 @@ extern void cl_UDS_mul_square (const uintD* sourceptr, uintC len, #define UDS_UDS_mul_UDS(len1,LSDptr1,len2,LSDptr2, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ var uintC CONCAT(len_from_UDSmul_,__LINE__) = (uintC)(len1) + (uintC)(len2); \ var uintD* CONCAT(LSDptr_from_UDSmul_,__LINE__); \ - unused (len_zuweisung CONCAT(len_from_UDSmul_,__LINE__)); \ + cl_unused (len_zuweisung CONCAT(len_from_UDSmul_,__LINE__)); \ num_stack_alloc(CONCAT(len_from_UDSmul_,__LINE__),MSDptr_zuweisung,LSDptr_zuweisung CONCAT(LSDptr_from_UDSmul_,__LINE__) =); \ cl_UDS_mul((LSDptr1),(len1),(LSDptr2),(len2),CONCAT(LSDptr_from_UDSmul_,__LINE__)); @@ -2616,7 +2616,7 @@ extern void cl_UDS_mul_square (const uintD* sourceptr, uintC len, var uintD* MSDptr0; \ var uintD* LSDptr0; \ var uintC len_from_DSmal = (uintC)(len1) + (uintC)(len2); \ - unused (len_zuweisung len_from_DSmal); \ + cl_unused (len_zuweisung len_from_DSmal); \ num_stack_alloc(len_from_DSmal,MSDptr_zuweisung MSDptr0 =,LSDptr_zuweisung LSDptr0 =); \ var uintD MSD1_from_DSmal = mspref(MSDptr1,0); \ var uintD MSD2_from_DSmal = mspref(MSDptr2,0); \ diff --git a/src/base/digitseq/cl_DS_mul_fftm.h b/src/base/digitseq/cl_DS_mul_fftm.h index a984802..212b58d 100644 --- a/src/base/digitseq/cl_DS_mul_fftm.h +++ b/src/base/digitseq/cl_DS_mul_fftm.h @@ -60,7 +60,7 @@ static inline void assign (const uintC R, const uintC chlen, const uintD* a, uintD* r) { - unused R; + cl_unused R; copy_loop_lsp(a,r,chlen); } @@ -68,7 +68,7 @@ static inline void assign (const uintC R, const uintC chlen, static void addm (const uintC R, const uintC chlen, const uintD* a, const uintD* b, uintD* r) { - unused R; + cl_unused R; // r := a+b. add_loop_lsp(a,b, r, chlen); #if 0 @@ -96,7 +96,7 @@ static void addm (const uintC R, const uintC chlen, static void subm (const uintC R, const uintC chlen, const uintD* a, const uintD* b, uintD* r) { - unused R; + cl_unused R; // r := a-b. sub_loop_lsp(a,b, r, chlen); #if 0 @@ -178,7 +178,7 @@ static void shiftleftm (const uintC R, const uintC chlen, static void mulm (const uintC R, const uintC chlen, const uintD* a, const uintD* b, uintD* r) { - unused R; + cl_unused R; // The leading digits are very likely to be 0. var uintP a_len = chlen; if (lspref(a,a_len-1) == 0) @@ -233,7 +233,7 @@ static void mulm (const uintC R, const uintC chlen, static void shiftm (const uintC R, const uintC chlen, const uintD* a, uintD* b) { - unused R; + cl_unused R; shiftrightcopy_loop_msp(a lspop chlen,b lspop chlen,chlen,1,0); if (lspref(a,0) & 1) { // ((a + p) >> 1) = (a >> 1) + (p>>1) + 1. diff --git a/src/base/digitseq/cl_DS_mul_nuss.h b/src/base/digitseq/cl_DS_mul_nuss.h index fc9602f..75e8f17 100644 --- a/src/base/digitseq/cl_DS_mul_nuss.h +++ b/src/base/digitseq/cl_DS_mul_nuss.h @@ -1229,7 +1229,7 @@ static void mulu_nuss_cyclic (const uintL n, const uintC N, // N = 2^n nuss_outword * z // N words result ) { - unused N; + cl_unused N; #if 0 // always n > 0 if (n == 0) { // z[0] := x0 y0 diff --git a/src/base/hash/cl_hash.h b/src/base/hash/cl_hash.h index 46803c1..798f2b7 100644 --- a/src/base/hash/cl_hash.h +++ b/src/base/hash/cl_hash.h @@ -142,7 +142,7 @@ protected: } private: // Default function to make room in a hash table. - static bool no_garcol (cl_heap* ht) { unused ht; return false; } + static bool no_garcol (cl_heap* ht) { cl_unused ht; return false; } }; template diff --git a/src/base/ring/cl_no_ring.cc b/src/base/ring/cl_no_ring.cc index a5df996..018e186 100644 --- a/src/base/ring/cl_no_ring.cc +++ b/src/base/ring/cl_no_ring.cc @@ -55,38 +55,38 @@ uninitialized_exception::uninitialized_exception (const _cl_ring_element& obj_x, static const _cl_ring_element dummy_op0 (cl_heap_ring* R) { - unused R; + cl_unused R; throw uninitialized_ring_exception(); } static const _cl_ring_element dummy_op1 (cl_heap_ring* R, const _cl_ring_element& x) { - unused R; + cl_unused R; throw uninitialized_exception(x); } static const _cl_ring_element dummy_op2 (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused R; + cl_unused R; throw uninitialized_exception(x, y); } static void dummy_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { - unused R; - unused stream; + cl_unused R; + cl_unused stream; throw uninitialized_exception(x); } static bool dummy_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused R; + cl_unused R; throw uninitialized_exception(x, y); } #define dummy_zero dummy_op0 static bool dummy_zerop (cl_heap_ring* R, const _cl_ring_element& x) { - unused R; + cl_unused R; throw uninitialized_exception(x); } #define dummy_plus dummy_op2 @@ -96,7 +96,7 @@ static bool dummy_zerop (cl_heap_ring* R, const _cl_ring_element& x) #define dummy_one dummy_op0 static const _cl_ring_element dummy_canonhom (cl_heap_ring* R, const cl_I& x) { - unused R; + cl_unused R; (void)&x; // unused x; throw uninitialized_ring_exception(); } @@ -104,7 +104,7 @@ static const _cl_ring_element dummy_canonhom (cl_heap_ring* R, const cl_I& x) #define dummy_square dummy_op1 static const _cl_ring_element dummy_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { - unused R; + cl_unused R; (void)&y; // unused y; throw uninitialized_exception(x); } @@ -146,7 +146,7 @@ static void cl_no_ring_destructor (cl_heap* pointer) static void cl_no_ring_dprint (cl_heap* pointer) { - unused pointer; + cl_unused pointer; fprint(cl_debugout, "(cl_ring) cl_no_ring"); } diff --git a/src/base/symbol/cl_symbol.cc b/src/base/symbol/cl_symbol.cc index 8e38f71..c868e0b 100644 --- a/src/base/symbol/cl_symbol.cc +++ b/src/base/symbol/cl_symbol.cc @@ -21,7 +21,7 @@ inline const cl_string hashkey (const cl_symbol& sym) // A symbol points to a string, so to convert cl_string -> cl_symbol, we just // take the pointer and put it into a cl_symbol. inline cl_symbol::cl_symbol (struct hashuniq * null, const cl_string& s) - : cl_rcpointer (as_cl_private_thing(s)) { unused null; } + : cl_rcpointer (as_cl_private_thing(s)) { cl_unused null; } typedef cl_htuniqentry cl_htentry_from_string_to_symbol; diff --git a/src/complex/cl_C.h b/src/complex/cl_C.h index 11a3d06..abbf122 100644 --- a/src/complex/cl_C.h +++ b/src/complex/cl_C.h @@ -83,9 +83,9 @@ public: }; inline bool realp (const cl_C& x) - { unused x; return false; } + { cl_unused x; return false; } inline bool complexp (const cl_C& x) - { unused x; return true; } + { cl_unused x; return true; } // Liefert zu reellen Zahlen a und b /= Fixnum 0 die komplexe Zahl a+bi. diff --git a/src/complex/input/cl_N_read.cc b/src/complex/input/cl_N_read.cc index 9365972..53b2321 100644 --- a/src/complex/input/cl_N_read.cc +++ b/src/complex/input/cl_N_read.cc @@ -250,7 +250,7 @@ not_rational_syntax: , if (!(flags.syntax & syntax_sfloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_ffloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_dfloat)) goto not_float_syntax; - , unused len; + , cl_unused len; if (!(flags.syntax & syntax_lfloat)) goto not_float_syntax; ); return read_complex_number_rest(flags,ptr_after_prec,string,string_limit,end_of_parse, @@ -301,7 +301,7 @@ not_complex_syntax: static const cl_N read_complex_number_rest (const cl_read_flags& flags, const char * string_rest, const char * string, const char * string_limit, const char * * end_of_parse, const cl_R& x) { - unused string; + cl_unused string; if ((flags.syntax & syntax_complex) && (flags.lsyntax & lsyntax_algebraic)) { // Finish reading the "+yi" part of "x+yi". // We allow "y" to begin with a '-'. diff --git a/src/complex/ring/cl_C_ring.cc b/src/complex/ring/cl_C_ring.cc index ab941c8..626cc5b 100644 --- a/src/complex/ring/cl_C_ring.cc +++ b/src/complex/ring/cl_C_ring.cc @@ -17,13 +17,13 @@ namespace cln { static void N_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { - unused R; + cl_unused R; fprint(stream,The(cl_N)(x)); } static bool N_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused R; + cl_unused R; return equal(The(cl_N)(x),The(cl_N)(y)); } @@ -34,7 +34,7 @@ static const _cl_ring_element N_zero (cl_heap_ring* R) static bool N_zerop (cl_heap_ring* R, const _cl_ring_element& x) { - unused R; + cl_unused R; // Here we return true only if x is the *exact* zero. Because we // don't want the degree of polynomials to depend on rounding errors. // For all ring theoretic purposes, we treat 0.0, 0+0.0i etc. as if @@ -138,7 +138,7 @@ static void cl_complex_ring_destructor (cl_heap* pointer) static void cl_complex_ring_dprint (cl_heap* pointer) { - unused pointer; + cl_unused pointer; fprint(cl_debugout, "(cl_complex_ring) cl_C_ring"); } diff --git a/src/complex/transcendental/cl_C_expt_C.cc b/src/complex/transcendental/cl_C_expt_C.cc index f4b8d27..3e48acb 100644 --- a/src/complex/transcendental/cl_C_expt_C.cc +++ b/src/complex/transcendental/cl_C_expt_C.cc @@ -89,7 +89,7 @@ inline const cl_N expt_0 (const cl_N& x) } #else // Exponent exakt 0 -> Ergebnis exakt 1 - unused x; + cl_unused x; return 1; #endif } diff --git a/src/float/dfloat/cl_DF.h b/src/float/dfloat/cl_DF.h index 7d93c85..6951bf2 100644 --- a/src/float/dfloat/cl_DF.h +++ b/src/float/dfloat/cl_DF.h @@ -121,7 +121,7 @@ inline cl_heap_dfloat* allocate_dfloat (uint32 semhi, uint32 mlo) { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - DF_exp_mid); /* Exponent */ \ - unused (sign_zuweisung ((sint64)_x >> 63)); /* Vorzeichen */ \ + cl_unused (sign_zuweisung ((sint64)_x >> 63)); /* Vorzeichen */ \ mant_zuweisung (bit(DF_mant_len) | (_x & (bit(DF_mant_len)-1))); \ } } #else @@ -142,7 +142,7 @@ inline cl_heap_dfloat* allocate_dfloat (uint32 semhi, uint32 mlo) { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - DF_exp_mid); /* Exponent */ \ - unused (sign_zuweisung sign_of((sint32)(semhi))); /* Vorzeichen */\ + cl_unused (sign_zuweisung sign_of((sint32)(semhi))); /* Vorzeichen */\ manthi_zuweisung (bit(DF_mant_len-32) | (semhi & (bit(DF_mant_len-32)-1))); \ mantlo_zuweisung mlo; \ } } diff --git a/src/float/dfloat/misc/cl_DF_digits.cc b/src/float/dfloat/misc/cl_DF_digits.cc index 9b9f555..d7457ae 100644 --- a/src/float/dfloat/misc/cl_DF_digits.cc +++ b/src/float/dfloat/misc/cl_DF_digits.cc @@ -15,7 +15,7 @@ namespace cln { CL_INLINE uintC CL_INLINE_DECL(float_digits) (const cl_DF& x) { - unused x; + cl_unused x; return DF_mant_len+1; // 53 } diff --git a/src/float/ffloat/cl_FF.h b/src/float/ffloat/cl_FF.h index 370bffc..efe7886 100644 --- a/src/float/ffloat/cl_FF.h +++ b/src/float/ffloat/cl_FF.h @@ -66,7 +66,7 @@ extern cl_class cl_class_ffloat; // Builds a float from the explicit word. #if defined(CL_WIDE_POINTERS) inline cl_FF::cl_FF (struct cl_heap_ffloat * null, cl_uint w) - : cl_F ((cl_private_thing) w) { unused null; } + : cl_F ((cl_private_thing) w) { cl_unused null; } inline const cl_FF allocate_ffloat (ffloat eksplicit) { return cl_FF((struct cl_heap_ffloat *) 0, ((cl_uint)eksplicit << FF_value_shift) | (cl_FF_tag << cl_tag_shift)); @@ -128,7 +128,7 @@ inline const cl_FF make_FF (cl_sint sign, unsigned int exp, cl_uint mant) { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - FF_exp_mid); /* Exponent */ \ - unused (sign_zuweisung sign_of((sint32)(_x))); /* Vorzeichen */\ + cl_unused (sign_zuweisung sign_of((sint32)(_x))); /* Vorzeichen */\ mant_zuweisung (bit(FF_mant_len) | (_x & (bit(FF_mant_len)-1))); \ } } diff --git a/src/float/ffloat/misc/cl_FF_digits.cc b/src/float/ffloat/misc/cl_FF_digits.cc index 3e7cd6a..0afd1f3 100644 --- a/src/float/ffloat/misc/cl_FF_digits.cc +++ b/src/float/ffloat/misc/cl_FF_digits.cc @@ -15,7 +15,7 @@ namespace cln { CL_INLINE uintC CL_INLINE_DECL(float_digits) (const cl_FF& x) { - unused x; + cl_unused x; return FF_mant_len+1; // 24 } diff --git a/src/float/input/cl_F_read.cc b/src/float/input/cl_F_read.cc index f1097b3..48abe1a 100644 --- a/src/float/input/cl_F_read.cc +++ b/src/float/input/cl_F_read.cc @@ -161,7 +161,7 @@ const cl_F read_float (const cl_read_flags& flags, const char * string, const ch , if (!(flags.syntax & syntax_sfloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_ffloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_dfloat)) goto not_float_syntax; - , unused len; + , cl_unused len; if (!(flags.syntax & syntax_lfloat)) goto not_float_syntax; ); at_end_of_parse(ptr_after_prec); diff --git a/src/float/lfloat/cl_LF_impl.h b/src/float/lfloat/cl_LF_impl.h index 72a91ef..64b7163 100644 --- a/src/float/lfloat/cl_LF_impl.h +++ b/src/float/lfloat/cl_LF_impl.h @@ -68,12 +68,12 @@ inline cl_LF::cl_LF (cl_heap_lfloat* ptr) : cl_F ((cl_private_thing) ptr) {} { var Lfloat _x = TheLfloat(obj); \ var uintE uexp = _x->expo; \ if (uexp==0) \ - { unused (mantlen_zuweisung _x->len); zero_statement } /* e=0 -> Zahl 0.0 */\ + { cl_unused (mantlen_zuweisung _x->len); zero_statement } /* e=0 -> Zahl 0.0 */\ else \ { exp_zuweisung (sintE)(uexp - LF_exp_mid); /* Exponent */ \ sign_zuweisung _x->sign; /* Vorzeichen */\ - unused (mantMSDptr_zuweisung arrayMSDptr(_x->data, (uintP)(mantlen_zuweisung _x->len))); /* Mantissen-UDS */\ - unused (mantLSDptr_zuweisung arrayLSDptr(_x->data, (uintP)(mantlen_zuweisung _x->len))); \ + cl_unused (mantMSDptr_zuweisung arrayMSDptr(_x->data, (uintP)(mantlen_zuweisung _x->len))); /* Mantissen-UDS */\ + cl_unused (mantLSDptr_zuweisung arrayLSDptr(_x->data, (uintP)(mantlen_zuweisung _x->len))); \ } } // Einpacken eines Long-Float: diff --git a/src/float/sfloat/cl_SF.h b/src/float/sfloat/cl_SF.h index 4506016..8f92e2b 100644 --- a/src/float/sfloat/cl_SF.h +++ b/src/float/sfloat/cl_SF.h @@ -27,7 +27,7 @@ namespace cln { // Builds a float from the immediate word. inline cl_SF::cl_SF (struct cl_sfloat * null, cl_uint w) - : cl_F ((cl_private_thing) w) { unused null; } + : cl_F ((cl_private_thing) w) { cl_unused null; } inline const cl_SF cl_SF_from_word (cl_uint word) { return cl_SF((struct cl_sfloat *) 0, word); @@ -89,7 +89,7 @@ inline uintL SF_mant (const cl_SF& x) { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - SF_exp_mid); /* Exponent */ \ - unused (sign_zuweisung SF_sign(_x)); /* Vorzeichen */\ + cl_unused (sign_zuweisung SF_sign(_x)); /* Vorzeichen */\ mant_zuweisung SF_mant(_x); /* Mantisse */ \ } } diff --git a/src/float/sfloat/misc/cl_SF_digits.cc b/src/float/sfloat/misc/cl_SF_digits.cc index 4501f42..e4ea7db 100644 --- a/src/float/sfloat/misc/cl_SF_digits.cc +++ b/src/float/sfloat/misc/cl_SF_digits.cc @@ -15,7 +15,7 @@ namespace cln { CL_INLINE uintC CL_INLINE_DECL(float_digits) (const cl_SF& x) { - unused x; + cl_unused x; return SF_mant_len+1; // 17 } diff --git a/src/float/transcendental/cl_LF_ratseries_.cc b/src/float/transcendental/cl_LF_ratseries_.cc index b7c04fc..ae13cf2 100644 --- a/src/float/transcendental/cl_LF_ratseries_.cc +++ b/src/float/transcendental/cl_LF_ratseries_.cc @@ -25,7 +25,7 @@ static inline void eval__series_aux (uintC N1, uintC N2, const cl__series& args, cl_I* T) { - unused args; + cl_unused args; *T = N2-N1; } diff --git a/src/integer/cl_I.h b/src/integer/cl_I.h index f554504..c814bdb 100644 --- a/src/integer/cl_I.h +++ b/src/integer/cl_I.h @@ -27,7 +27,7 @@ namespace cln { // Private fixnum constructor. inline cl_I::cl_I (struct cl_fixnum * null, cl_uint w) - : cl_RA ((cl_private_thing) w) { unused null; } + : cl_RA ((cl_private_thing) w) { cl_unused null; } inline const cl_I cl_I_from_word (cl_uint w) { return cl_I((struct cl_fixnum *) 0, w); @@ -78,7 +78,7 @@ inline cl_I::cl_I (cl_heap_bignum* ptr) // Type tests. inline bool integerp (const cl_I& x) - { unused x; return true; } + { cl_unused x; return true; } inline bool fixnump (const cl_I& x) { return !x.pointer_p(); } inline bool bignump (const cl_I& x) @@ -546,9 +546,9 @@ inline sintD FN_MSD (cl_uint word) lspref(destLSDptr,3) = FN_LSD3(word); \ } \ } \ - unused (MSDptr_zuweisung (destLSDptr) lspop len_from_FN_to_NDS); \ - unused (len_zuweisung len_from_FN_to_NDS); \ - unused (LSDptr_zuweisung (destLSDptr)); \ + cl_unused (MSDptr_zuweisung (destLSDptr) lspop len_from_FN_to_NDS); \ + cl_unused (len_zuweisung len_from_FN_to_NDS); \ + cl_unused (LSDptr_zuweisung (destLSDptr)); \ } // Bignum to Normalized Digit sequence, Kopieren unnötig @@ -558,14 +558,14 @@ inline sintD FN_MSD (cl_uint word) #if CL_DS_BIG_ENDIAN_P #define BN_to_NDS_nocopy(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ { var Bignum bn_from_BN_to_NDS_nocopy = TheBignum(obj); \ - unused (MSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[0]); \ - unused (LSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[(uintP)( len_zuweisung bn_from_BN_to_NDS_nocopy->length )]); \ + cl_unused (MSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[0]); \ + cl_unused (LSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[(uintP)( len_zuweisung bn_from_BN_to_NDS_nocopy->length )]); \ } #else #define BN_to_NDS_nocopy(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ { var Bignum bn_from_BN_to_NDS_nocopy = TheBignum(obj); \ - unused (LSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[0]); \ - unused (MSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[(uintP)( len_zuweisung bn_from_BN_to_NDS_nocopy->length )]); \ + cl_unused (LSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[0]); \ + cl_unused (MSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[(uintP)( len_zuweisung bn_from_BN_to_NDS_nocopy->length )]); \ } #endif inline const uintD* BN_MSDptr (const cl_I& obj) @@ -726,9 +726,9 @@ public: }; inline bool fixnump (const cl_FN& x) - { unused x; return true; } + { cl_unused x; return true; } inline bool bignump (const cl_FN& x) - { unused x; return false; } + { cl_unused x; return false; } inline bool minusp (const cl_FN& x) { @@ -748,16 +748,16 @@ public: }; inline bool fixnump (const cl_BN& x) - { unused x; return false; } + { cl_unused x; return false; } inline bool bignump (const cl_BN& x) - { unused x; return true; } + { cl_unused x; return true; } inline bool minusp (const cl_BN& x) { return (sintD)mspref(arrayMSDptr(TheBignum(x)->data,TheBignum(x)->length),0) < 0; } inline bool zerop (const cl_BN& x) - { unused x; return false; } + { cl_unused x; return false; } } // namespace cln diff --git a/src/integer/ring/cl_0_ring.cc b/src/integer/ring/cl_0_ring.cc index 41f2d1d..def663d 100644 --- a/src/integer/ring/cl_0_ring.cc +++ b/src/integer/ring/cl_0_ring.cc @@ -21,37 +21,37 @@ static const _cl_ring_element null_op0 (cl_heap_ring* R) static const _cl_ring_element null_op1 (cl_heap_ring* R, const _cl_ring_element& x) { - unused x; + cl_unused x; return _cl_ring_element(R, (cl_I)0); } static const _cl_ring_element null_op2 (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused x; - unused y; + cl_unused x; + cl_unused y; return _cl_ring_element(R, (cl_I)0); } static void null_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { - unused R; - unused x; + cl_unused R; + cl_unused x; fprint(stream,"0"); } static bool null_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused R; - unused x; - unused y; + cl_unused R; + cl_unused x; + cl_unused y; return true; } #define null_zero null_op0 static bool null_zerop (cl_heap_ring* R, const _cl_ring_element& x) { - unused R; - unused x; + cl_unused R; + cl_unused x; return true; } #define null_plus null_op2 @@ -61,15 +61,15 @@ static bool null_zerop (cl_heap_ring* R, const _cl_ring_element& x) #define null_one null_op0 static const _cl_ring_element null_canonhom (cl_heap_ring* R, const cl_I& x) { - unused x; + cl_unused x; return _cl_ring_element(R, (cl_I)0); } #define null_mul null_op2 #define null_square null_op1 static const _cl_ring_element null_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { - unused x; - unused y; + cl_unused x; + cl_unused y; return _cl_ring_element(R, (cl_I)0); } @@ -126,7 +126,7 @@ static void cl_null_ring_destructor (cl_heap* pointer) static void cl_null_ring_dprint (cl_heap* pointer) { - unused pointer; + cl_unused pointer; fprint(cl_debugout, "(cl_null_ring) cl_0_ring"); } diff --git a/src/integer/ring/cl_I_ring.cc b/src/integer/ring/cl_I_ring.cc index f09588b..bdbedf7 100644 --- a/src/integer/ring/cl_I_ring.cc +++ b/src/integer/ring/cl_I_ring.cc @@ -19,13 +19,13 @@ namespace cln { static void I_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { - unused R; + cl_unused R; fprint(stream,The(cl_I)(x)); } static bool I_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused R; + cl_unused R; return equal(The(cl_I)(x),The(cl_I)(y)); } @@ -36,7 +36,7 @@ static const _cl_ring_element I_zero (cl_heap_ring* R) static bool CL_FLATTEN I_zerop (cl_heap_ring* R, const _cl_ring_element& x) { - unused R; + cl_unused R; return zerop_inline(The(cl_I)(x)); } @@ -137,7 +137,7 @@ static void cl_integer_ring_destructor (cl_heap* pointer) static void cl_integer_ring_dprint (cl_heap* pointer) { - unused pointer; + cl_unused pointer; fprint(cl_debugout, "(cl_integer_ring) cl_I_ring"); } diff --git a/src/modinteger/cl_MI.cc b/src/modinteger/cl_MI.cc index 1458b5b..6b2237c 100644 --- a/src/modinteger/cl_MI.cc +++ b/src/modinteger/cl_MI.cc @@ -57,7 +57,7 @@ cl_heap_modint_ring::cl_heap_modint_ring (cl_I m, cl_modint_setops* setopv, cl_m static bool modint_equal (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { - unused R; + cl_unused R; return equal(x.rep,y.rep); } diff --git a/src/modinteger/cl_MI_int.h b/src/modinteger/cl_MI_int.h index 6abac3c..7224e5d 100644 --- a/src/modinteger/cl_MI_int.h +++ b/src/modinteger/cl_MI_int.h @@ -9,7 +9,7 @@ static void int_fprint (cl_heap_modint_ring* R, std::ostream& stream, const _cl_ static const cl_I int_reduce_modulo (cl_heap_modint_ring* R, const cl_I& x) { - unused R; + cl_unused R; return x; // reducing modulo 0 does nothing } @@ -22,15 +22,15 @@ static const _cl_MI int_canonhom (cl_heap_modint_ring* R, const cl_I& x) // This is the only case where retract is surjective. static const cl_I int_retract (cl_heap_modint_ring* R, const _cl_MI& x) { - unused R; + cl_unused R; return x.rep; } // This is the only case where random yields an error. static const _cl_MI int_random (cl_heap_modint_ring* R, random_state& randomstate) { - unused R; - unused randomstate; + cl_unused R; + cl_unused randomstate; throw runtime_exception("Z / 0 Z not a finite set - no equidistributed random function."); } @@ -41,7 +41,7 @@ static const _cl_MI int_zero (cl_heap_modint_ring* R) static bool int_zerop (cl_heap_modint_ring* R, const _cl_MI& x) { - unused R; + cl_unused R; return zerop(x.rep); } diff --git a/src/modinteger/cl_MI_std.h b/src/modinteger/cl_MI_std.h index ede3818..007ed27 100644 --- a/src/modinteger/cl_MI_std.h +++ b/src/modinteger/cl_MI_std.h @@ -21,7 +21,7 @@ static const _cl_MI std_canonhom (cl_heap_modint_ring* R, const cl_I& x) static const cl_I std_retract (cl_heap_modint_ring* R, const _cl_MI& x) { - unused R; + cl_unused R; return x.rep; } @@ -37,7 +37,7 @@ static const _cl_MI std_zero (cl_heap_modint_ring* R) static bool std_zerop (cl_heap_modint_ring* R, const _cl_MI& x) { - unused R; + cl_unused R; return zerop(x.rep); } diff --git a/src/polynomial/elem/cl_UP_GF2.h b/src/polynomial/elem/cl_UP_GF2.h index 1a348fe..49e1e5d 100644 --- a/src/polynomial/elem/cl_UP_GF2.h +++ b/src/polynomial/elem/cl_UP_GF2.h @@ -17,7 +17,7 @@ static bool gf2_equal (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); - unused UPR; + cl_unused UPR; var const cl_heap_GV_I_bits1 * xv = (const cl_heap_GV_I_bits1 *) x.heappointer; var const cl_heap_GV_I_bits1 * yv = (const cl_heap_GV_I_bits1 *) y.heappointer; var uintL xlen = xv->v.size(); @@ -91,7 +91,7 @@ static const _cl_UP gf2_plus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const // In characteristic 2, -x = x. static const _cl_UP gf2_uminus (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { - unused UPR; + cl_unused UPR; return x; } diff --git a/src/polynomial/elem/cl_UP_MI.h b/src/polynomial/elem/cl_UP_MI.h index a35c14d..8ace327 100644 --- a/src/polynomial/elem/cl_UP_MI.h +++ b/src/polynomial/elem/cl_UP_MI.h @@ -82,7 +82,7 @@ static const _cl_UP modint_zero (cl_heap_univpoly_ring* UPR) static bool modint_zerop (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { - unused UPR; + cl_unused UPR; { DeclarePoly(cl_GV_MI,x); var sintL xlen = x.size(); if (xlen == 0) @@ -348,7 +348,7 @@ static const _cl_UP modint_scalmul (cl_heap_univpoly_ring* UPR, const cl_ring_el static sintL modint_degree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { - unused UPR; + cl_unused UPR; { DeclarePoly(cl_GV_MI,x); return (sintL) x.size() - 1; }} diff --git a/src/polynomial/elem/cl_UP_gen.h b/src/polynomial/elem/cl_UP_gen.h index 623a212..dc88ed1 100644 --- a/src/polynomial/elem/cl_UP_gen.h +++ b/src/polynomial/elem/cl_UP_gen.h @@ -78,7 +78,7 @@ static const _cl_UP gen_zero (cl_heap_univpoly_ring* UPR) static bool gen_zerop (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { - unused UPR; + cl_unused UPR; { DeclarePoly(cl_SV_ringelt,x); var sintL xlen = x.size(); if (xlen == 0) @@ -332,7 +332,7 @@ static const _cl_UP gen_scalmul (cl_heap_univpoly_ring* UPR, const cl_ring_eleme static sintL gen_degree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { - unused UPR; + cl_unused UPR; { DeclarePoly(cl_SV_ringelt,x); return (sintL) x.size() - 1; }} diff --git a/src/polynomial/elem/cl_UP_no_ring.cc b/src/polynomial/elem/cl_UP_no_ring.cc index 92f4259..585a42a 100644 --- a/src/polynomial/elem/cl_UP_no_ring.cc +++ b/src/polynomial/elem/cl_UP_no_ring.cc @@ -15,38 +15,38 @@ namespace cln { static const _cl_UP dummy_op0 (cl_heap_univpoly_ring* R) { - unused R; + cl_unused R; throw uninitialized_ring_exception(); } static const _cl_UP dummy_op1 (cl_heap_univpoly_ring* R, const _cl_UP& x) { - unused R; + cl_unused R; throw uninitialized_exception(x); } static const _cl_UP dummy_op2 (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y) { - unused R; + cl_unused R; throw uninitialized_exception(x, y); } static void dummy_fprint (cl_heap_univpoly_ring* R, std::ostream& stream, const _cl_UP& x) { - unused R; - unused stream; + cl_unused R; + cl_unused stream; throw uninitialized_exception(x); } static bool dummy_equal (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y) { - unused R; + cl_unused R; throw uninitialized_exception(x, y); } #define dummy_zero dummy_op0 static bool dummy_zerop (cl_heap_univpoly_ring* R, const _cl_UP& x) { - unused R; + cl_unused R; throw uninitialized_exception(x); } #define dummy_plus dummy_op2 @@ -56,7 +56,7 @@ static bool dummy_zerop (cl_heap_univpoly_ring* R, const _cl_UP& x) #define dummy_one dummy_op0 static const _cl_UP dummy_canonhom (cl_heap_univpoly_ring* R, const cl_I& x) { - unused R; + cl_unused R; (void)&x; // unused x; throw uninitialized_ring_exception(); } @@ -64,63 +64,63 @@ static const _cl_UP dummy_canonhom (cl_heap_univpoly_ring* R, const cl_I& x) #define dummy_square dummy_op1 static const _cl_UP dummy_expt_pos (cl_heap_univpoly_ring* R, const _cl_UP& x, const cl_I& y) { - unused R; + cl_unused R; (void)&y; // unused y; throw uninitialized_exception(x); } static const _cl_UP dummy_scalmul (cl_heap_univpoly_ring* R, const cl_ring_element& x, const _cl_UP& y) { - unused R; - unused x; + cl_unused R; + cl_unused x; throw uninitialized_exception(y); } static sintL dummy_degree (cl_heap_univpoly_ring* R, const _cl_UP& x) { - unused R; + cl_unused R; throw uninitialized_exception(x); } static sintL dummy_ldegree (cl_heap_univpoly_ring* R, const _cl_UP& x) { - unused R; + cl_unused R; throw uninitialized_exception(x); } static const _cl_UP dummy_monomial (cl_heap_univpoly_ring* R, const cl_ring_element& x, uintL e) { - unused R; - unused x; - unused e; + cl_unused R; + cl_unused x; + cl_unused e; throw uninitialized_ring_exception(); } static const cl_ring_element dummy_coeff (cl_heap_univpoly_ring* R, const _cl_UP& x, uintL index) { - unused R; - unused index; + cl_unused R; + cl_unused index; throw uninitialized_exception(x); } static const _cl_UP dummy_create (cl_heap_univpoly_ring* R, sintL deg) { - unused R; - unused deg; + cl_unused R; + cl_unused deg; throw uninitialized_ring_exception(); } static void dummy_set_coeff (cl_heap_univpoly_ring* R, _cl_UP& x, uintL index, const cl_ring_element& y) { - unused R; - unused index; - unused y; + cl_unused R; + cl_unused index; + cl_unused y; throw uninitialized_exception(x); } static void dummy_finalize (cl_heap_univpoly_ring* R, _cl_UP& x) { - unused R; + cl_unused R; throw uninitialized_exception(x); } static const cl_ring_element dummy_eval (cl_heap_univpoly_ring* R, const _cl_UP& x, const cl_ring_element& y) { - unused R; - unused y; + cl_unused R; + cl_unused y; throw uninitialized_exception(x); } diff --git a/src/polynomial/elem/cl_UP_number.h b/src/polynomial/elem/cl_UP_number.h index 50e5cb1..1007c5e 100644 --- a/src/polynomial/elem/cl_UP_number.h +++ b/src/polynomial/elem/cl_UP_number.h @@ -78,7 +78,7 @@ static const _cl_UP num_zero (cl_heap_univpoly_ring* UPR) static bool num_zerop (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { - unused UPR; + cl_unused UPR; { DeclarePoly(cl_SV_number,x); var sintL xlen = x.size(); if (xlen == 0) @@ -330,7 +330,7 @@ static const _cl_UP num_scalmul (cl_heap_univpoly_ring* UPR, const cl_ring_eleme static sintL num_degree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { - unused UPR; + cl_unused UPR; { DeclarePoly(cl_SV_number,x); return (sintL) x.size() - 1; }} diff --git a/src/rational/cl_RA.h b/src/rational/cl_RA.h index bdd911c..e0adf30 100644 --- a/src/rational/cl_RA.h +++ b/src/rational/cl_RA.h @@ -46,7 +46,7 @@ inline cl_RA::cl_RA (cl_heap_ratio* ptr) // Type tests. inline bool rationalp (const cl_RA& x) - { unused x; return true; } + { cl_unused x; return true; } inline bool integerp (const cl_RA& x) { if (!x.pointer_p()) @@ -75,9 +75,9 @@ public: }; inline bool integerp (const cl_RT& x) - { unused x; return false; } + { cl_unused x; return false; } inline bool ratiop (const cl_RT& x) - { unused x; return true; } + { cl_unused x; return true; } // Access numerator and denominator. inline const cl_I& numerator (const cl_RT& x) @@ -104,7 +104,7 @@ inline bool minusp (const cl_RA& x) // (ZEROP x) == (= x 0) inline bool zerop (const cl_RT& x) - { unused x; return false; } + { cl_unused x; return false; } inline bool zerop (const cl_RA& x) { return x.word == cl_combine(cl_FN_tag,0); diff --git a/src/rational/ring/cl_RA_ring.cc b/src/rational/ring/cl_RA_ring.cc index 50fa33d..bc15753 100644 --- a/src/rational/ring/cl_RA_ring.cc +++ b/src/rational/ring/cl_RA_ring.cc @@ -19,13 +19,13 @@ namespace cln { static void RA_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { - unused R; + cl_unused R; fprint(stream,The(cl_RA)(x)); } static bool RA_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused R; + cl_unused R; return equal(The(cl_RA)(x),The(cl_RA)(y)); } @@ -36,7 +36,7 @@ static const _cl_ring_element RA_zero (cl_heap_ring* R) static bool CL_FLATTEN RA_zerop (cl_heap_ring* R, const _cl_ring_element& x) { - unused R; + cl_unused R; return zerop_inline(The(cl_RA)(x)); } @@ -137,7 +137,7 @@ static void cl_rational_ring_destructor (cl_heap* pointer) static void cl_rational_ring_dprint (cl_heap* pointer) { - unused pointer; + cl_unused pointer; fprint(cl_debugout, "(cl_rational_ring) cl_RA_ring"); } diff --git a/src/real/input/cl_R_read.cc b/src/real/input/cl_R_read.cc index 4577cf4..af7b59e 100644 --- a/src/real/input/cl_R_read.cc +++ b/src/real/input/cl_R_read.cc @@ -251,7 +251,7 @@ not_rational_syntax: , if (!(flags.syntax & syntax_sfloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_ffloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_dfloat)) goto not_float_syntax; - , unused len; + , cl_unused len; if (!(flags.syntax & syntax_lfloat)) goto not_float_syntax; ); at_end_of_parse(ptr_after_prec); diff --git a/src/real/ring/cl_R_ring.cc b/src/real/ring/cl_R_ring.cc index d733a97..748c3c9 100644 --- a/src/real/ring/cl_R_ring.cc +++ b/src/real/ring/cl_R_ring.cc @@ -18,13 +18,13 @@ namespace cln { static void R_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { - unused R; + cl_unused R; fprint(stream,The(cl_R)(x)); } static bool R_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { - unused R; + cl_unused R; return equal(The(cl_R)(x),The(cl_R)(y)); } @@ -35,7 +35,7 @@ static const _cl_ring_element R_zero (cl_heap_ring* R) static bool R_zerop (cl_heap_ring* R, const _cl_ring_element& x) { - unused R; + cl_unused R; // Here we return true only if x is the *exact* zero. Because we // don't want the degree of polynomials to depend on rounding errors. // For all ring theoretic purposes, we treat 0.0 as if it were a @@ -139,7 +139,7 @@ static void cl_real_ring_destructor (cl_heap* pointer) static void cl_real_ring_dprint (cl_heap* pointer) { - unused pointer; + cl_unused pointer; fprint(cl_debugout, "(cl_real_ring) cl_R_ring"); } diff --git a/src/vector/cl_GV_I.cc b/src/vector/cl_GV_I.cc index 328b31b..dc8aab3 100644 --- a/src/vector/cl_GV_I.cc +++ b/src/vector/cl_GV_I.cc @@ -180,7 +180,7 @@ static cl_GV_I_vectorops bits##m##_vectorops = {{ \ static void bits_do_delete (cl_GV_inner* vec) { - unused vec; + cl_unused vec; } // Copy bits srcptr.bits[srcindex..srcindex+count-1] into destptr.bits[destindex..destindex+count-1]. diff --git a/src/vector/cl_GV_number_debug.cc b/src/vector/cl_GV_number_debug.cc index 2ceb5b4..555483d 100644 --- a/src/vector/cl_GV_number_debug.cc +++ b/src/vector/cl_GV_number_debug.cc @@ -17,8 +17,8 @@ namespace cln { static void print_for_debug (std::ostream& stream, const cl_print_flags& flags, const cl_number& z) { - unused stream; // must be cl_debugout - unused flags; // must be default_print_flags + cl_unused stream; // must be cl_debugout + cl_unused flags; // must be default_print_flags z.debug_print(); } diff --git a/src/vector/cl_SV_number_debug.cc b/src/vector/cl_SV_number_debug.cc index cec65ec..22fbc0f 100644 --- a/src/vector/cl_SV_number_debug.cc +++ b/src/vector/cl_SV_number_debug.cc @@ -17,8 +17,8 @@ namespace cln { static void print_for_debug (std::ostream& stream, const cl_print_flags& flags, const cl_number& z) { - unused stream; // must be cl_debugout - unused flags; // must be default_print_flags + cl_unused stream; // must be cl_debugout + cl_unused flags; // must be default_print_flags z.debug_print(); } -- 2.46.2