This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Code:
static int k_02; #define INC_K(num) k_##num++; void test(int i) { INC_K(02); }
Command line:
C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/bin/armcl -mv7R4 --code_state=32 --float_support=VFPv3D16 -O4 --check_misra="7.1" -g --strict_ansi --emit_warnings_as_errors --diag_wrap=off --diag_warning=225 --display_error_number --abi=eabi --enum_type=packed --preproc_with_compile misra_7_1.c
Output:
"misra_7_1.c", line 6: error #1382: (MISRA-C:2004 7.1/R) Octal constants (other than zero) and octal escape sequences shall not be used
1 error detected in the compilation of "misra_7_1.c".
IMHO in this case "02" isn't constant, this is macro parameter.