You are not seasoned enough it seems. Placing variable declarations after instructions is only allowed in C99 and not in C89. And furthermore SDCC does not support it in any mode as described in the manual under ANSI compliance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am compiling a simple program and am getting a weird sounding error. I am new to sdcc but quite seasoned in C.
Gives:
But if I comment our the first line:
I get:
I was hoping someone a bit more seasoned could help me out.
And for refrence:
Oh, and I realized stdint.h wasn't needed. I get the same error when it is removed.
The same thing happens if I replace the assignment with a function call.
You are not seasoned enough it seems. Placing variable declarations after instructions is only allowed in C99 and not in C89. And furthermore SDCC does not support it in any mode as described in the manual under ANSI compliance.
Thank you, I thought of this as I was going to bed. its been forever since I used c89 complaint c. Thanks once again and have a great day.