[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] tcc macro infos
From: |
grischka |
Subject: |
Re: [Tinycc-devel] tcc macro infos |
Date: |
Tue, 01 Jun 2010 15:08:03 +0200 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
Luca Costantino wrote:
i printed all the macros that are pushed using "define_push()", then
i printed all the macros in the stack starting from "define_stack" ad
going back using "prev" pointer.
i end up having some more STRANGE macro in this second phase...
[...]
__builtin_inline
L.268436531 <-- ???
L.268436526 <-- ???
__aligned
L.268436526 <-- ???
[...]
i have not been able to figure out what that numbers are.
can anyone please give me some clues?
On the 'define_stack' there are also the macro parameters, such
as 'ap' and 'type' in "#define va_arg(ap, type) ..."
See parse_define at tccpp.c:1199:
s = sym_push2(&define_stack, varg | SYM_FIELD, is_vaargs, 0);
Hence to get these names properly you have to use
get_tok_str(sym->v & ~SYM_FIELD, NULL)
Otherwise it would print as bogus anonymous label (at tccpp.c:338):
} else if (v >= SYM_FIRST_ANOM) {
/* special name for anonymous symbol */
sprintf(p, "L.%u", v - SYM_FIRST_ANOM);
--- grischka