Take the following program test.asm:
.cdecls C, LIST
%{
struct foo;
int foo(void);
%}
Compile it with:
cl6x.exe -c --abi=eabi test.asm
The following error is printed:
"c:\temp\045084", ERROR! at line 34: [E0300] Structure tag can't be global
foo .struct 0,1 ; struct size=(0 bytes|0 bits), alignment=0
"c:\temp\045084", ERROR! at line 38: [E0004] Invalid identifier 'foo'
specified
.global foo
Obviously, the assembler complains about a .struct, whose tag is 'foo',
and later a '.global foo' function is defined.
Probably the assembler should be fixed not to confuse structure tags
with global symbols definitions. Note that this issue does not exist
with COFF ABI, because there the function is '.global _foo'.
Precisely the same behavior is manifested by the TMS470 compiler.