Use long instead of int to hold pointer values.

This commit is contained in:
Shinichiro Hamaji 2008-12-01 02:07:25 +09:00 committed by grischka
parent d6072d3703
commit 2355fc7686

8
tcc.c
View File

@ -184,8 +184,8 @@ typedef struct SValue {
/* symbol management */
typedef struct Sym {
int v; /* symbol token */
int r; /* associated register */
int c; /* associated number */
long r; /* associated register */
long c; /* associated number */
CType type; /* associated type */
struct Sym *next; /* next related symbol */
struct Sym *prev; /* prev symbol in stack */
@ -1846,7 +1846,7 @@ char *get_tok_str(int v, CValue *cv)
}
/* push, without hashing */
static Sym *sym_push2(Sym **ps, int v, int t, int c)
static Sym *sym_push2(Sym **ps, int v, int t, long c)
{
Sym *s;
s = sym_malloc();
@ -2640,7 +2640,7 @@ static inline void define_push(int v, int macro_type, int *str, Sym *first_arg)
{
Sym *s;
s = sym_push2(&define_stack, v, macro_type, (int)str);
s = sym_push2(&define_stack, v, macro_type, (long)str);
s->next = first_arg;
table_ident[v - TOK_IDENT]->sym_define = s;
}