MISRA Discussion Forums
Rule 6.9.2: Unclear interpretation about "char" - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C++ (https://forum.misra.org.uk/forumdisplay.php?fid=18)
+--- Forum: MISRA C++:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=188)
+---- Forum: 4.6 Basic concepts (https://forum.misra.org.uk/forumdisplay.php?fid=192)
+---- Thread: Rule 6.9.2: Unclear interpretation about "char" (/showthread.php?tid=1701)



Rule 6.9.2: Unclear interpretation about "char" - cgpzs - 03-09-2024

Hi,

Rule 6.9.2 says it applies to "integral types constructed using the keywords char, ...". 
But it also says "it does not apply to the use of plain char".

This is confusing - is "char" allowed or not? Can you provide an example that shows where "char" is allowed and where it's not? I cannot find any in the rule explanation.

Thanks!


RE: Rule 6.9.2: Unclear interpretation about "char" - cgpzs - 04-09-2024

I read now that "standard signed integer types" and "standard unsigned integer types" are defined as "signed char" and "unsigned char" respectively, so plain "char" is out of scope (and allowed). So the rule is clear now, this topic can be closed!