File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ import cpp
1515import codingstandards.c.misra
1616import codingstandards.cpp.IntegerConstantMacro
1717
18-
1918from MacroInvocation macroInvoke , IntegerConstantMacro macro
2019where
2120 not isExcluded ( macroInvoke , Types2Package:: useOfBannedSmallIntegerConstantMacroQuery ( ) ) and
22- macroInvoke .getMacro ( ) = macro
23- and macro .isSmall ( )
24- select
25- macroInvoke , "Usage of small integer constant macro " + macro .getName ( ) + " is not allowed."
21+ macroInvoke .getMacro ( ) = macro and
22+ macro .isSmall ( )
23+ select macroInvoke , "Usage of small integer constant macro " + macro .getName ( ) + " is not allowed."
Original file line number Diff line number Diff line change 11#include "stdint.h"
22
3- int8_t g1 = INT8_C (0x12 ); // NON-COMPLIANT
4- uint8_t g2 = UINT8_C (0x12 ); // NON-COMPLIANT
5- int16_t g3 = INT16_C (0x1234 ); // NON-COMPLIANT
3+ int8_t g1 = INT8_C (0x12 ); // NON-COMPLIANT
4+ uint8_t g2 = UINT8_C (0x12 ); // NON-COMPLIANT
5+ int16_t g3 = INT16_C (0x1234 ); // NON-COMPLIANT
66uint16_t g4 = UINT16_C (0x1234 ); // NON-COMPLIANT
7- int32_t g5 = INT32_C (0x1234 ); // COMPLIANT
7+ int32_t g5 = INT32_C (0x1234 ); // COMPLIANT
88uint32_t g6 = UINT32_C (0x1234 ); // COMPLIANT
9- int64_t g7 = INT64_C (0x1234 ); // COMPLIANT
9+ int64_t g7 = INT64_C (0x1234 ); // COMPLIANT
1010uint64_t g8 = UINT64_C (0x1234 ); // COMPLIANT
You can’t perform that action at this time.
0 commit comments