|
From: | Changming Xu |
Subject: | Re: [Tinycc-devel] tcc failed to compile after preprocess |
Date: | Tue, 1 Mar 2011 12:35:08 +0800 |
Changming Xu wrote:Okay, I see. We need to force a space.
#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
Don't know. Now it's up to you to choose ;)
do we have better way?
Yes, why not.
another example:
#define CONC(a,b) a/**/b
to 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;
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
_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Prev in Thread] | Current Thread | [Next in Thread] |