bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: src/kwset.c (kwsincr): Replace arbitrary array size by proper value


From: Andreas Schwab
Subject: Re: src/kwset.c (kwsincr): Replace arbitrary array size by proper value
Date: Mon, 04 Jul 2005 22:45:16 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

Julian Foad <address@hidden> writes:

> Charles Levert wrote:
>> --- src/kwset.c      2005-07-04 01:14:37 -0400
>> +++ src/kwset.c      2005-07-04 11:45:33 -0400
>> @@ -121,6 +121,14 @@ kwsalloc (char const *trans)
>>    return (kwset_t) kwset;
>>  }
>>  +/* This upper bound is valid for CHAR_BIT >= 4 and
>> +   exact for CHAR_BIT in { 4..11, 13, 15, 17, 19 }. */
>> +#if CHAR_BIT < 4
>> +#error "CHAR_BIT is smaller than 4; yeah, right!"
>
> I don't much like that "#error".  For one thing, I think we can just assume 
> that CHAR_BIT is not less than 4.

The C standard required CHAR_BIT >= 8 anyway, and I don't think there was
ever any pre-standard implementation with (the equivalent of) CHAR_BIT < 8.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]