SDCC prints wrong type information wrt. the ABI version (__sdcccall). This results in slightly confusing error messages:
void f(void) __sdcccall(1);
void f(void)
{
}
SDCC invokation:
~~~~
philipp@notebook6:/tmp$ ~/sdcc-trunk/sdcc/bin/sdcc -mstm8 --sdcccall 0 test.c
test.c:3: error 98: conflict with previous declaration of 'f' for attribute 'type' at test.c:1
from type 'void function ( ) __sdcccall(0) fixed'
to type 'void function ( ) fixed'
~~~~
Similar when the ABI versions are swapped (0 insource, 0 on command line): The error message is always the other way round from what it should be.
The attached patch fixes this. Note that the logic on when an error should be reported is unchanged (as it was correct before), just the content of the error message is changed.
Fixed in [r13081].