aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2012-03-14 15:47:42 +0100
committerThomas Preud'homme <robotux@celest.fr>2012-03-14 15:47:42 +0100
commit1736a71b71221df7c81b0d3da25e774f3c4005d2 (patch)
tree949c919743bd13ea5169b87eb4f56849a4413f7c /tccpp.c
parent53c5715cca20231c47ccef9d17d440334f4a318e (diff)
downloadtinycc-1736a71b71221df7c81b0d3da25e774f3c4005d2.tar.gz
tinycc-1736a71b71221df7c81b0d3da25e774f3c4005d2.tar.bz2
Consider long int constant as 64 bits on x86-64
Quick and dirty hack to consider long int constant (as in 1UL or 1L) as 64 bits integer on x86-64 non Windows systems.
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tccpp.c b/tccpp.c
index ff47838..d1043e0 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -2028,12 +2028,16 @@ static void parse_number(const char *p)
if (lcount >= 2)
tcc_error("three 'l's in integer constant");
lcount++;
+#if !defined TCC_TARGET_X86_64 || defined TCC_TARGET_PE
if (lcount == 2) {
+#endif
if (tok == TOK_CINT)
tok = TOK_CLLONG;
else if (tok == TOK_CUINT)
tok = TOK_CULLONG;
+#if !defined TCC_TARGET_X86_64 || defined TCC_TARGET_PE
}
+#endif
ch = *p++;
} else if (t == 'U') {
if (ucount >= 1)