-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-14868
-
-
-
default
-
The fix for https://sir.ext.ti.com/jira/browse/EXT_EP-12834 changed the typedef for __int16_t and __uint16_t to use short instead of int.
This exposed issues in C2000Ware projects where global variables do not consistently use only type definitions from stdint.h which then results in parser errors for incompatible types.
Avoid the issue by only using the type definitions from stdint.h
The following is a summary way to see the problem.
C:\examples>type file.c #include <stdint.h> extern unsigned int name; extern uint16_t name; C:\examples>cl2000 -I\ti\compilers\ti-cgt-c2000_22.6.2.LTS\include file.c C:\examples>cl2000 -I\ti\compilers\ti-cgt-c2000_22.6.3.LTS\include file.c "file.c", line 3: error: declaration is incompatible with "unsigned int name" (declared at line 2) 1 error detected in the compilation of "file.c". >> Compilation failure
The first command shows the source file. Declaring the same name twice in one file, with slightly different types, is not typical. It represents C2000Ware source doing the same thing, but across different header files. The second command shows that it builds clean when using version 22.6.2.LTS header files. The third command shows the error emitted when using version 22.6.3.LTS header files.