...
It is implementation defined whether the specifier int
designates the same type as signed int
or the same type as unsigned int
for bit-fields. According to C99 [ISO/IEC 9899:1999], C integer promotions also require that "if an int
can represent all values of the original type, the value is converted to an int
; otherwise, it is converted to an unsigned int
."
...
Wiki Markup |
---|
\[[ISO/IEC 9899:1999|AA. References#ISOBibliography#ISO/IEC 9899-1999]\] Section 6.7.2, "Type specifiers" \[[ISO/IEC PDTR 24772|AA. References#ISOBibliography#ISO/IEC PDTR 24772]\] "STR Bit Representations" \[[MISRA 04|AA. References#MISRABibliography#MISRA 04]\] Rule 12.7 |
...
INT11-C. Take care when converting from pointer to integer or integer to pointer 04. Integers (INT)