I'm experiencing a problem with the TI C compiler v7.3.2. Apart from -I, -D and -f* options, I'm using the following: "cl6x -qq --gcc -O3 -mi200 -mv6455 -mt -mw -oi -pdr --abi=eabi -k"
The problem is where two developers have used a static inline function with the same name. Basically, a simplified case would be with two files:
File 1:
static inline ResetState(void)
{
/* Do some resetting */
}
/* Lots of other code where ResetState gets called and is correctly inlined */
extern void GloballyUniqueName1(void)
{
ResetState();
}
File 2:
static inline ResetState(void)
{
/* Do some different resetting */
}
/* Lots of other code where ResetState gets called and is correctly inlined */
extern void GloballyUniqueName2(void)
{
ResetState();
}
The compiler seems to insert a .symalias of GloballyUniqueName1 to ResetState and, likewise, for GloballyUniqueName2. As a result, the supposedly file-scope names are leaked into the global namespace and the linker throws a wobbly with "error: symbol "ResetState " redefined". If I comment out the call in (say) GloballyUniqueName1, everything builds fine, with no mention of ResetState in the assembly at all.
Is this a compiler bug or is there additional decoration required on the static inline function to make it really static?
TIA,
SPH.