This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Broken Stringize operator?

The C51 (version 6.14) preprocessor is broken. The stringize operator doesn't evaluate previously defined macros before it turns the contents to a string.

E.G.:

#define VERSION    1234
#define MK_STR(x)  #x

...
void print_version( void ) {
    printf( MK_STR( VERSION ));
}

should yield: "1234"
instead, it gives "VERSION"

What gives? Has this been fixed in a newer release?