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.
typedef struct { int v1; } s1_t; static s1_t s1; void test(s1_t s2) { s1.v1 = s2.v1; s1.v1++; //To avoid unused warning }
Command:
C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/bin/armcl -mv7R4 --code_state=32 --float_support=VFPv3D16 -O4 --check_misra="17.6" -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_17_6.c
Output:
"misra_17_6.c", line 8: error #1423: (MISRA-C:2004 17.6/R) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist ("s2")
1 error detected in the compilation of "misra_17_6.c".
There is not address assignment! This error misreported for halcogen generated code. For sample - sys_dma.c
Thank you for notifying us of this problem, and for submitting a concise test case. I can reproduce the problem. I filed CODEGEN-1639 in the SDOWP system to have this investigated. You are welcome to follow it with the SDOWP link below in my signature.
Thanks and regards,
-George