Re: creating a new integer type in C (incompatible with other types)

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

 



Vincent Lefevre <vincent+gcc@xxxxxxxxxx> writes:

> On 2024-07-29 11:15:42 +0200, Marc Glisse wrote:
>> I don't think you can "create" new ones arbitrarily, but if another
>> one already exists, you could use that. For instance _BitInt(64)
>> with a recent enough gcc.
>
> OK, I suppose that I could use _BitInt(65), _BitInt(66) for the
> other types as they seem to be supported (at least on my platform).
> This is not absolutely guaranteed to work, but at least compilation
> errors due to incompatible types should be meaningful.

It is also quite easy to create duplicate types that way.  Perhaps
single-member structs will work for your use-case (but, yeah, lots of
boxing and unboxing).
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux