Hi list,
I hope you can help me with this, I've read the mail archives, forums,
website and pdf doc, experimented like crazy, and I just cannot get inline
functions to compile.
>From what I gather, others don't have this same problem, so maybe it's just
my syntax... I'm still new to C I guess..
This:
unsigned char f1(unsigned char x) { return x + 6; }
Compiles fine......
This:
inline unsigned char f1(unsigned char x) { return x + 6; }
Returns this:
main.c:34: syntax error: token -> 'unsigned' ; column 15
Essentially, whatever I put after the inline keyword, generates a syntax
error. I tried with SDCC 2.7, 2.8, and a few recent nightlies and an older
one from april, all the same... Tried using the -std-c99 switch and still
the same... Tried a few different ways to declare/define the function, no
joy... Am I doing something wrong? I know that this is 'alpha' but from what
I gather, it at least compiles for others. I could use macros, but I'd
rather not, if I can help it.
Thanks in advance for any help you can give (and for the good tips I've
picked up from this list in the past!)
stryd_one
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user