diff mbox series

[v3,18/19] add predefined macros for char{16,32}_t

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

Commit Message

Luc Van Oostenryck Dec. 14, 2018, 12:15 a.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 3084b6197..23d5ec417 100644
--- a/lib.c
+++ b/lib.c
@@ -1250,6 +1250,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);