aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji _at_ gmail.com>2008-12-01 02:07:25 +0900
committergrischka <grischka>2008-12-02 02:26:03 +0100
commit2355fc7686057f4ce53a0ed84629d7b5a18696a7 (patch)
tree702f8e26cc50fce128d16f0a58593e8e8b841afc
parentd6072d3703df0bce6ee12b24546ba796303af1fd (diff)
downloadtinycc-2355fc7686057f4ce53a0ed84629d7b5a18696a7.tar.gz
tinycc-2355fc7686057f4ce53a0ed84629d7b5a18696a7.tar.bz2
Use long instead of int to hold pointer values.
-rw-r--r--tcc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tcc.c b/tcc.c
index 97d4445..deaa411 100644
--- a/tcc.c
+++ b/tcc.c
@@ -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;
}