> It is a deficiency that SIZE_TYPE is defined to be a string at all (and > likewise for all the other target macros for standard typedefs including > all those for <stdint.h>). Separately, it's a deficiency that these > things are target macros rather than target hooks.
My thought was that there'd be a set of target hooks that returned a TREE for various types. But as an interim solution, the checks that use strcmp() should fail into a type lookup-by-name. I.e. replace the gcc_unreachables with expensive table lookups. I think there's an advantage in newlib to having a macro that expands to the type-as-a-string needed for various types. Of course, if gcc had a typedef for those types, that would be better, but slightly harder to autodetect. > Instead of having an __int128 keyword (target-independent) targets > would be able to define a set of N for which there are __intN > keywords and for which everything handling __int128 will equally > handle __intN. That sounds great, and would elide the problem of a target needing to register their own types for those. I hadn't considered simplifying the intN_t problem, since you *can* register custom types, I was mostly just thinking about how to *use* those types for size_t et al.