Hi and sorry for my English.
I think that i have discovered a bug in preprocessor.
This bug don't allow to use more than only one "if"
sentence in macros. When we use several "if"
sentences, "if ... else" sentences or "if.. else if ..."
sentences the preprocessor generates a
warning: "unreachable code" in the line of the main
program where is the call to the macro.
I attach a simply program that defines a macro that
uses an "if .. else" sentence, and the main function call
I'm using the latest version of sdcc (2.4.0)
compile the file:> sdcc -c bug.c
it generates the warning "unreachable code" in the line
where the main function call the macro that uses
the "if .. else" sentence.
David Martinez Martinez
Log in to post a comment.