[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: grischka
Subject: Re: [Tinycc-devel] tcc failed to compile after preprocess
Date: Mon, 28 Feb 2011 18:22:58 +0100
User-agent: Thunderbird (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/**/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

reply via email to

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