#ifdef SOME
#include <stdint.h>
#else
#include <string.h>
#endif
void test() {
}
Command line:
C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/bin/armcl --include_path="C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include" -mv7R4 --code_state=32 --float_support=VFPv3D16 -O4 --check_misra="19.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_19_1.c
Output:
"misra_19_1.c", line 4: error #1425: (MISRA-C:2004 19.1/A) #include statements in a file should only be preceded by other preprocessor directives or comments
1 error detected in the compilation of "misra_19_1.c".
PS: facepalm.jpg
Why you not hire software testers?