|
|
Subscribe / Log in / New account

New C features in GCC 13 (Red Hat Developer)

New C features in GCC 13 (Red Hat Developer)

Posted May 6, 2023 0:51 UTC (Sat) by NYKevin (subscriber, #129325)
In reply to: New C features in GCC 13 (Red Hat Developer) by vadim
Parent article: New C features in GCC 13 (Red Hat Developer)

In the vast majority of real implementations, int_fastXX_t is implemented as a simple typedef, just like everything else in stdint.h. As far as most implementations are concerned, the only "real" integer types are char, short, int, long, and long long (as well as their unsigned variants). Everything else is just a typedef to one of those. This is also why the standard does not require that any of the intXX_t types exist - it might be the case that none of the five "primitive" integer types are exactly XX bits wide, and then the typedef may be omitted.

As a result, while an implementation is permitted to consider code length in deciding which type to use for int_fastXX_t, in practice the implementation must select *one* fixed width (for each int_fastXX_t type) and use it throughout the entire ABI. If you think about it, this is pretty much required anyway, because otherwise there could be no separate compilation of functions taking int_fastXX_t as an argument.


to post comments

New C features in GCC 13 (Red Hat Developer)

Posted May 6, 2023 14:32 UTC (Sat) by mathstuf (subscriber, #69389) [Link]

> the only "real" integer types are char, short, int, long, and long long (as well as their unsigned variants).

With the one exception that `char`, `signed char`, and `unsigned char` are distinct.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds