diff mbox series

[v2,14/14] add predefined macros for char{16,32}_t

Message ID 20181212164554.43133-15-luc.vanoostenryck@gmail.com (mailing list archive)
State Superseded, archived
Headers show
Series predefined macros for intmax_t/intptr_t/... | expand

Commit Message

Luc Van Oostenryck Dec. 12, 2018, 4:45 p.m. UTC
These types are supposed to be defined the same as
uint_least{8,16}_t. So define them as 'ushort' and 'uint'.

Note: it seems that some archs define char32_t as 'ulong' although
      their 'uint' is 32bit ...

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 lib.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/lib.c b/lib.c
index 78f33fa63..32e7483ef 100644
--- a/lib.c
+++ b/lib.c
@@ -1277,6 +1277,8 @@  static void predefined_macros(void)
 	predefined_ctype("SCHAR",      &char_ctype, PTYPE_MAX|PTYPE_WIDTH);
 	predefined_ctype("WCHAR",      wchar_ctype, PTYPE_ALL_T|PTYPE_TYPE);
 	predefined_ctype("WINT",        wint_ctype, PTYPE_ALL_T|PTYPE_TYPE);
+	predefined_ctype("CHAR16",   &ushort_ctype, PTYPE_TYPE);
+	predefined_ctype("CHAR32",     &uint_ctype, PTYPE_TYPE);
 
 	predefined_ctype("INT",         &int_ctype, PTYPE_ALL);
 	predefined_ctype("LONG",       &long_ctype, PTYPE_ALL);