aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>2015-11-17 19:09:35 +0000
committerEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>2015-11-17 19:09:35 +0000
commit569fba6db9c12916bd2802a7ee46dc5609118e0b (patch)
tree8dc680cf47393c8eadb8563e4a842ce1e6656c01 /tccpp.c
parent3712c958f4ef31ce006edeab6c34875ea5ae08f8 (diff)
downloadtinycc-569fba6db9c12916bd2802a7ee46dc5609118e0b.tar.gz
tinycc-569fba6db9c12916bd2802a7ee46dc5609118e0b.tar.bz2
Merge the integer members of union CValue into "uint64_t i".
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tccpp.c b/tccpp.c
index 77fedb4..8b78deb 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -293,15 +293,15 @@ ST_FUNC const char *get_tok_str(int v, CValue *cv)
case TOK_CINT:
case TOK_CUINT:
/* XXX: not quite exact, but only useful for testing */
- sprintf(p, "%u", cv->ui);
+ sprintf(p, "%llu", (unsigned long long)cv->i);
break;
case TOK_CLLONG:
case TOK_CULLONG:
/* XXX: not quite exact, but only useful for testing */
#ifdef _WIN32
- sprintf(p, "%u", (unsigned)cv->ull);
+ sprintf(p, "%u", (unsigned)cv->i);
#else
- sprintf(p, "%llu", cv->ull);
+ sprintf(p, "%llu", (unsigned long long)cv->i);
#endif
break;
case TOK_LCHAR:
@@ -2287,9 +2287,9 @@ static void parse_number(const char *p)
}
if (tok == TOK_CINT || tok == TOK_CUINT)
- tokc.ui = n;
+ tokc.i = n;
else
- tokc.ull = n;
+ tokc.i = n;
}
if (ch)
tcc_error("invalid number\n");