|
From: | grischka |
Subject: | Re: [Tinycc-devel] tcc failed to compile after preprocess |
Date: | Mon, 28 Feb 2011 18:22:58 +0100 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Changming Xu wrote:
#define m(name,r) name ## r #define m0(a,b,c) int m(a,b) c #define m1(a,b,c) int m(a,b)c m0(a, b, c); m1(a, b, c); if only spc = 0;m1 failed, but i have no idea if we should fix it in tcc, it's not that important
Okay, I see. We need to force a space.
do we have better way?
Don't know. Now it's up to you to choose ;)
another example: #define CONC(a,b) a/**/bto fix it, return ' ' when see a /**/comment(also c++ comment?) in next_nomacro1 which/* comments or operator */ case '/': PEEKC(c, p); if (c == '*') { p = parse_comment(p); #if 1 tok = ' '; goto keep_tok_flags; #endif goto redo_no_start;
Yes, why not. While at it please put declaration above statements to stay c89 compatible. Not everybody here uses gcc to compile tcc: macro_str1 = macro_twosharps(ptr); int append_space = 0; Thanks, --- grischka
[Prev in Thread] | Current Thread | [Next in Thread] |