[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc failed to compile after preprocess

From: Changming Xu
Subject: Re: [Tinycc-devel] tcc failed to compile after preprocess
Date: Tue, 1 Mar 2011 12:35:08 +0800

Thanks, I pushed a new commit

2011/3/1 grischka <address@hidden>
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/**/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;
           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;


--- grischka

Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]