mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-17 15:44:18 +08:00
libtcc.c:
- free 'elfint' string
- acceot -O and -Os
- accept -gstabs (to override dwarf when default)
- better -Wp,...
tccpp.c:
- #line cleanup
also warn with "extra tokens after directive"
tccgen.c & xxx_gen.c:
- force CPU flags to register earlier
tccelf.c:
- tcc_load_object: align size only for code sections
data/bss objects are always put with their specfic type align
(in decl_initializer_alloc())
x86/64 doesn't need aligned code
from c6afdff7ab
tccpe.c:
- enable dllimport for "_imp__<sym>" also from assembler
x86_64-gen.c & lib/libtcc1.c:
- simpler fneg without libtcc1 reference
tests2/134_double_to_signed.c:
- a tcc compiled by msvc won't pass this test
18 lines
375 B
C
18 lines
375 B
C
#include <stdio.h>
|
|
int main() {
|
|
printf("%d\n", (int)-1.0);
|
|
double d = -1.0;
|
|
printf("%d\n", (int)d);
|
|
|
|
printf("%d\n", (int)-2147483648.0);
|
|
d = -2147483648.0;
|
|
printf("%d\n", (int)d);
|
|
|
|
#ifndef _WIN32
|
|
printf("%llu\n", (unsigned long long)1e19);
|
|
#else
|
|
/* some msvc compiler won't compile tcc correctly in this ragard */
|
|
printf("10000000000000000000\n");
|
|
#endif
|
|
}
|