From: Taylor R Campbell Date: Wed, 12 Dec 2012 06:06:39 +0000 (+0000) Subject: Tidy up local declarations in DEFINE_BIT_COUNT. X-Git-Tag: release-9.2.0~206 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=7d38bbba79990a32060ab1c0435becac1dbe0f43;p=mit-scheme.git Tidy up local declarations in DEFINE_BIT_COUNT. `static' is pointless (and causes `gcc -O0' to actually allocate static storage for them), and using uintmax_t rather than TYPE is overkill. --- diff --git a/src/microcode/bits.h b/src/microcode/bits.h index fa0dac6d8..8cb2512ab 100644 --- a/src/microcode/bits.h +++ b/src/microcode/bits.h @@ -34,20 +34,19 @@ static inline unsigned int \ NAME (TYPE x) \ { \ /* #b01010101... */ \ - static const uintmax_t two_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 1))); \ + const TYPE two_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 1))); \ \ /* #b00110011... */ \ - static const uintmax_t four_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 2))); \ + const TYPE four_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 2))); \ \ /* #b00001111... */ \ - static const uintmax_t eight_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 4))); \ + const TYPE eight_bit_mask = ((~ ((TYPE) 0)) / (1 + (1 << 4))); \ \ /* Assumption: The number of bits in a uintmax_t fits in eight bits \ (unsigned); that is, the number of bits is less than 256. */ \ \ /* This is a bit mask covering the total number of bits we need. */ \ - static const uintmax_t final_mask \ - = (((CHAR_BIT * (sizeof (TYPE))) << 1) - 1); \ + const TYPE final_mask = (((CHAR_BIT * (sizeof (TYPE))) << 1) - 1); \ \ int i; \ \