mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-21 05:40:09 +08:00
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.
This commit is contained in:
parent
53c5715cca
commit
1736a71b71
4
tccpp.c
4
tccpp.c
@ -2028,12 +2028,16 @@ static void parse_number(const char *p)
|
|||||||
if (lcount >= 2)
|
if (lcount >= 2)
|
||||||
tcc_error("three 'l's in integer constant");
|
tcc_error("three 'l's in integer constant");
|
||||||
lcount++;
|
lcount++;
|
||||||
|
#if !defined TCC_TARGET_X86_64 || defined TCC_TARGET_PE
|
||||||
if (lcount == 2) {
|
if (lcount == 2) {
|
||||||
|
#endif
|
||||||
if (tok == TOK_CINT)
|
if (tok == TOK_CINT)
|
||||||
tok = TOK_CLLONG;
|
tok = TOK_CLLONG;
|
||||||
else if (tok == TOK_CUINT)
|
else if (tok == TOK_CUINT)
|
||||||
tok = TOK_CULLONG;
|
tok = TOK_CULLONG;
|
||||||
|
#if !defined TCC_TARGET_X86_64 || defined TCC_TARGET_PE
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ch = *p++;
|
ch = *p++;
|
||||||
} else if (t == 'U') {
|
} else if (t == 'U') {
|
||||||
if (ucount >= 1)
|
if (ucount >= 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user