[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] X(X(1)) (nested macro substitution)
From: |
Sergey Korshunoff |
Subject: |
[Tinycc-devel] X(X(1)) (nested macro substitution) |
Date: |
Tue, 26 Apr 2016 13:32:23 +0300 |
About
#define Y(x) Z(x)
#define X Y
X(X(1))
If comment out in tccpp.c the following lines
/* if nested substitution, do nothing */
if ( (!s->next)
&& sym_find2(*nested_list, t))
{
/* and mark it as TOK_NOSUBST, so it doesn't get subst'd again */
tok_str_add2(tok_str, TOK_NOSUBST, NULL);
goto no_subst;
}
then we get the right result Z(Z(1) (but tcc loops in other macro
substiturion cases).
Currently we get Z(Y(1)), i.e. Y() is added to the nosubst_list affter
first substitution.
- [Tinycc-devel] X(X(1)) (nested macro substitution),
Sergey Korshunoff <=
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), Sergey Korshunoff, 2016/04/28
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), Michael B. Smith, 2016/04/28
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), Vincent Lefevre, 2016/04/28
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), Sergey Korshunoff, 2016/04/29
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), grischka, 2016/04/29
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), Sergey Korshunoff, 2016/04/29
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), Edmund Grimley Evans, 2016/04/29
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), u-tcc-uepj, 2016/04/29
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), David Mertens, 2016/04/29
- Re: [Tinycc-devel] X(X(1)) (nested macro substitution), Sergey Korshunoff, 2016/04/29