Using a "bit" type as a function parameter doesn't
seem to be properly supported.
I have several problems with the following code:
static char f(bit a, bit b) reentrant
return f(3, 2);
1. Trying to compile:
$ sdcc statre.c
statre.c:8: error: storage class not allowed for
automatic variable 'a' in reentrant function unless
But, as you can see, it is static! Am I missing
something, or is it a bug?
2. Removing "reentrant". Now it compiles, but both
the arguments are treated as "char", and the return
value is 6. Apparently "c" is handled properly, but
"a" and "b" - not. I would expect 3 at return.
IIRC older sdcc used to put the "bit" vars, even
if arguments, to a BSEG. Right now I see _f_PARM_2
in a DSEG, which doesn't look good (without z() it
is placed to an OSEG).
Log in to post a comment.