This adds the _Float16 preprocessor macro definitions.
My understanding is that, given that we support TS18661-2 by default, this macro should be predefined by clang and then there is no need to protect these macros.
You may want to add a test for this in test/Preprocessor/init.c.
There is a typo here, these macros should start with __FLT16_. Add a test for these names test/Headers/float.c.
certainly you're right, the TS says
so (if I read this right) these identifiers are only available if such macro is defined when including float.h.
Can I assume from your comment that someone else should define it? Perhaps the float.h header itself, some other file in the C-library implementation or the user of the compiler via some -D__STDC_WANT_IEC_60559_TYPES_EXT__, but not be predefined by the compiler? If this is the case, then the macros still have to be guarded conditionally (as they were in the original patch).
Does this make sense? Thanks.
I think we could justify defining it ourselves under non-strict compilation modes; alternatively, system headers might define it for users in non-strict modes.
My reading of the TS is that in strict mode, these types and macros should be hidden unless the user explicitly requests them by defining __STDC_WANT_IEC_60559_TYPES_EXT__ themselves.