Mail Archives: djgpp/1993/05/17/08:57:48
Andy Vaught wrote:
>#define stringize(x) # x
>#define QSIZE 50
>
>printf("Message queue overflow! size = " stringize(QSIZE) );
>
>
>which gets preprocessed to:
>
>printf("Message queue overflow! size = " "QSIZE" );
>
>
>When what I am looking for is to get a "50" instead of "QSIZE". TCC
>does this properly. Any clues?
>
In that case, TCC is doing it improperly: stringified macro arguments
_do not get expanded_ according to ANSI. What is needed is:
#define magic_stringize(x) x
#define stringize(x) # x
Cheers =8-} Chipsy
- Raw text -