This is the mail archive of the
mailing list for the GCC project.
Re: How to define a built-in 24-bit type?
On Wed, 25 Jan 2012, Georg-Johann Lay wrote:
> You mean that thread?
Yes, the whole thread (with particular reference to my comments about what
should be kept target-dependent).
> For the 128-bit integers there is just one type __int128 and unsigned variant
> is unsigned __int128, whereas for the 24-bit types are are two types: __int24
> for signed and __uint24 for unsigned flavor.
> Is there an advantage of one approach over the other?
signed and unsigned __int128 is more consistent with standard C types, but
harder to implement within a back end because it involves a new keyword.
Two different type names can be implemented purely within your back end
without needing generic work elsewhere first to make that possible, but
users might expect to be able to use unsigned __int24 - or _Complex
__int24 - and find that won't work if you use the built-in typedef
Joseph S. Myers