Why int32_t is long int on 32 Bit Intel?

Brian Inglis Brian.Inglis@Shaw.ca
Thu Jul 27 23:13:52 GMT 2023


On 2023-07-27 05:55, panda.trooper wrote:
> Hi, can somebody explain what is the reason behind the architectural decision that on x86 the type of int32_t is long int by default and not int when using newlib?

Lots of embedded processors have 16 bit int and 32 bit long, and 80186 
compatibles are still being produced and sold, although gcc -m16 now has 
limitations.

[The ancient PDP-11 is still supported by gcc 13:

https://gcc.gnu.org/onlinedocs/gcc/gcc-command-options/machine-dependent-options/pdp-11-options.html

probably because it may still be exemplary CISC ISA in comp arch courses using 
simulators like SimH et al.]

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Newlib mailing list