MISRA Discussion Forums
Essential type of wchar_t? - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA C:2012 and MISRA C:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=21)
+---- Forum: 8.10 The essential type model (https://forum.misra.org.uk/forumdisplay.php?fid=165)
+---- Thread: Essential type of wchar_t? (/showthread.php?tid=1131)



Essential type of wchar_t? - sca2012 - 21-11-2014

What is the essential category and rank of (implementation dependent) C99 type wchar_t?


Re: Essential type of wchar_t? - misra-c - 05-12-2014

Appendix D.1 lists the mapping of standard types to essential type categories. wchar_t is an implementation-defined integer type. It will therefore map to either an essentially signed or unsigned type depending on the implementation. Its rank will be that of its implementation.

Future versions of the MISRA guidelines are likely to define a specific essential type for wchar_t.