Am 12.10.20 um 17:55 schrieb Alan Cox:
> On Mon, 12 Oct 2020 17:25:55 +0200
> Philipp Klaus Krause <p...@spth.de> wrote:
> 
>> I wonder how useful arbitrary-width integers would be for SDCC users.
>>
>> _ExtInt(N) would be an N-bit integer type.
>>
>> E.e. one could have an unsigned 24-bit integer (in 3 bytes) via
>>
>> unsigned _ExtInt(24) i;
>>
>> or a 23-bit type (3 bytes in memory, 23 value bits and 1 padding bit):
>>
>> unsigned _ExtInt(23) i;
>>
>> If such a type is introduced, would you prefer this type to exempt from
>> integer promotion?
> 
> How would they pack in arrays, and how would it differ fron bitfields ?
> 
> Alan
> 

Unlike bit-fields, they could be used as function parameters or return
values and would have an address. In arrays, too, each element of the
unsigned _ExtInt(23) mentioned above would use 3 bytes.

Philipp


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to