grischka
5b113f3ee3
win32: handle __declspec(dllimport)
2009-11-13 18:04:56 +01:00
grischka
dd70d19267
#define __TINYC__ = version-number
2009-11-13 17:11:52 +01:00
grischka
834b782a9c
tccpe: fill checksum header field
2009-08-24 13:30:02 +02:00
grischka
569c20f104
tccpp: fix quirk with cached headers and #else
...
Such as with
#ifndef FOO_H
...
#else
...
#endif
2009-08-24 13:30:01 +02:00
grischka
1026ca5888
fix "symbol not defined" if symbol has offset 0
2009-08-24 13:30:01 +02:00
grischka
d923e652f2
tccpp: avoid double free with macro_ptr_allocated (after errors)
2009-08-24 13:30:00 +02:00
grischka
0d34c2136e
tccgen: free inline functions correctly
2009-08-24 13:30:00 +02:00
grischka
697f9e305d
win64: fix bat
2009-08-24 13:28:02 +02:00
grischka
b08dfb8273
tcc: optionally build using libtcc
2009-07-18 22:08:01 +02:00
grischka
f88350b611
fix some warning
2009-07-18 22:07:51 +02:00
grischka
c998985c74
cleanup: constify some global data
2009-07-18 22:07:42 +02:00
grischka
94ae3984b0
tccpe: set tcc_lib_path from DLL
2009-07-18 22:07:33 +02:00
grischka
1df662c1b0
tccpe: load dll on the fly
2009-07-18 22:07:25 +02:00
grischka
9fda4f4248
win32: treat long double as double
2009-07-18 22:07:17 +02:00
grischka
97738d1ae9
win32: reformat examples, crt etc
2009-07-18 22:07:10 +02:00
grischka
bb5e0df79a
x86-64: fix load() for const pointers: (void*)-2
2009-07-18 22:07:03 +02:00
grischka
fc977d56c9
x86-64: chkstk, alloca
2009-07-18 22:06:54 +02:00
grischka
c0fc0fa0c4
win64: add x64 target to build-tcc.bat
2009-07-18 22:06:46 +02:00
grischka
dc251a7d8d
win64: use new headers from mingw
2009-07-18 22:06:37 +02:00
grischka
06aed3d171
win64: update tiny_impdef, tiny_libmaker (Elf64)
2009-07-18 22:06:14 +02:00
grischka
09ac9faf59
win64: align jmp_buf
2009-07-18 22:06:07 +02:00
grischka
035918ef2f
win64: fix pointer <-> unsigned long typecast issues
2009-07-18 22:05:58 +02:00
grischka
459875796b
pe32+ target: adjust x86_64-gen.c
...
- calling conventions are different:
* only 4 registers
* stack "scratch area" is always reserved
* doubles are mirrored in normal registers
- no GOT or PIC there
2009-07-18 22:05:49 +02:00
grischka
3ba1532cfb
pe32+ target: add to makefile
2009-07-18 22:05:40 +02:00
grischka
3ea4acb9b9
pe32+ target: add in various #define's
2009-07-18 22:05:27 +02:00
grischka
719ba918dd
tccpe: use more official structs
2009-07-18 21:55:32 +02:00
grischka
f366cb20fe
tccpe: support pe32+ (x86_64) target
2009-07-18 21:55:28 +02:00
grischka
fe8def3303
tccpe: use ElfW macros
2009-07-18 21:55:25 +02:00
grischka
dcfad3af49
tccpe: get rid of kludgy export-symbol sort
2009-07-18 21:55:20 +02:00
grischka
370cdeb628
tccpe: build IAT vector with with -run too
...
This prepares for x86_64 where we need the vector
for far jumps. Also, resolve DLL symbols in place
2009-07-18 21:55:15 +02:00
grischka
bed17847bd
cleanup: stop abuse of sym->c for #define tokenstreams
2009-07-18 21:55:10 +02:00
grischka
d0b432ab38
cleanup: stop abuse of sym->r for inline functions
2009-07-18 21:55:06 +02:00
grischka
5e83b64dae
cleanup: put prototypes in front of libtcc.c
2009-07-18 21:55:02 +02:00
grischka
85e481b66e
pp: return newline after directive
2009-07-18 21:54:58 +02:00
grischka
fcdb663dde
pp: simplify pasting, enable L ## number
2009-07-18 21:54:55 +02:00
grischka
045cff28fe
fix asmtest (somehow), update Makefiles
2009-07-18 21:54:51 +02:00
grischka
0085c648f6
bcheck: restore malloc hooks when done
2009-07-18 21:54:47 +02:00
grischka
c93ddac9aa
configure: support DESTDIR for RPM packagers etc.
...
Suggested by Shlomi Fish
2009-07-18 21:54:43 +02:00
grischka
ec4a350620
win32: guard va_list typedef
2009-06-17 02:11:40 +02:00
grischka
c4b7e77bbe
accept option -x <lang>
2009-06-17 02:11:27 +02:00
grischka
610fd47510
win32: structure return GCC compatible (ret 4 with cdecl)
2009-06-17 02:11:13 +02:00
grischka
ec54c34b9e
error messages: print "error: ..."
2009-06-17 02:10:56 +02:00
grischka
e4ae77c7bb
tcc_preprocess: add gcc-style include-depth flags
...
# 1 "main.c"
# 1 "include/stdio.h" 1
# 123 "include/stdio.h" 3
# 10 "main.c" 2
flags: 1: level++; 3: same-level 2: level--
2009-06-17 02:10:42 +02:00
grischka
956b4beec1
incompatible function ptr assignment: just warn
...
void fn_1(int i) {}
void (*fn_2)(char*) = fn_1;
2009-06-17 02:10:24 +02:00
grischka
6a004ed19f
allow redefinition of func_old_type functions
...
void *memcpy(void*, const void*, unsigned);
This gave an error if memcpy() has been used before
implicitely, e.g. for structure passing etc.
2009-06-17 02:09:52 +02:00
grischka
a342bbadc8
use static declaration from prototype
...
static int func();
...
int func() { }
As result, func needs to be static.
2009-06-17 02:09:20 +02:00
grischka
69fdb57edd
unions: initzialize only one field
...
struct {
union {
int a,b;
};
int c;
} sss = { 1,2 };
This had previously assigned 1,2 to a,b and 0 to c which is wrong.
2009-06-17 02:09:07 +02:00
grischka
bba515afe5
tccelf: accept BSS symbol with same name from other module
...
... such as 'int baz;' in two files at the same time
2009-06-17 02:08:54 +02:00
grischka
110a4edc15
drop alloca #define
...
(Because GNU's alloca.h unconditionally #undef's alloca)
Also, remove gcc specific sections in headers. and
instead change tests such that gcc does not use them.
2009-05-16 22:30:13 +02:00
grischka
68310299b6
ulibc: #define TCC_UCLIBC and load elf_interp
2009-05-16 22:29:40 +02:00
grischka
bf8d8f5f3e
update Changelog, bump version: 0.9.25
2009-05-11 19:01:26 +02:00
grischka
aed6a7cb60
fix "cached include" optimization
...
comparing the filenames as in the #include statement can be
ambiguous if including files are in different directories.
Now caches and checks the really opened filename instead.
2009-05-11 18:55:16 +02:00
grischka
ca4b4a52ad
fix build with msvc
2009-05-11 18:53:52 +02:00
grischka
03c787d6ce
fix unused/uninitalized warnings
2009-05-11 18:46:39 +02:00
grischka
40f5ce002e
fix warnings with tcc_add/get_symbol
2009-05-11 18:46:25 +02:00
grischka
67aebdd5b7
enable making tcc using libtcc
2009-05-11 18:46:02 +02:00
grischka
0a35f9d66e
move static prototypes to libtcc.c
2009-05-11 18:45:56 +02:00
grischka
f9181416f6
move some global variables into TCCState
2009-05-11 18:45:44 +02:00
grischka
5c6509578e
make tcc from tcc.c and libtcc from libtcc.c
2009-05-05 20:41:17 +02:00
grischka
b8f6e1ae30
move minor things from libtcc.c to other files
2009-05-05 20:30:39 +02:00
grischka
92204e8818
move global variables to libtcc.c
2009-05-05 20:30:13 +02:00
grischka
9dc9cbf319
move libtcc interface and helper functions to libtcc.c
2009-05-05 20:18:53 +02:00
grischka
0d1ed74102
move parser/generator to tccgen.c
2009-05-05 20:18:10 +02:00
grischka
805990b94e
move preprocessor to tccpp.c
2009-05-05 20:17:49 +02:00
grischka
ae37bd5abc
move declarations to tcc.h
2009-05-05 20:17:26 +02:00
grischka
a93bcdffae
new files: tcc.h libtcc.c tccpp.c tccgen.c
2009-05-05 20:17:11 +02:00
grischka
15626621fb
cleanup makefiles
2009-04-19 21:24:32 +02:00
grischka
e9e89ad699
enable backtrace only when it's supported
2009-04-18 18:39:27 +02:00
grischka
5829791ffa
fix makefiles etc for subdirs
2009-04-18 15:08:03 +02:00
grischka
ea5e81bd6a
new subdirs: include, lib, tests
2009-04-18 15:08:03 +02:00
grischka
e8a52a8249
win32: readme.txt->tcc-win32.txt, update tcc-doc
2009-04-18 15:08:03 +02:00
grischka
eca1fbaf92
mute strange difference in tcctest
2009-04-18 15:08:03 +02:00
grischka
b56f956247
libtcc: add support to be build as DLL
2009-04-18 15:08:03 +02:00
grischka
d165e87340
libtcc: new api tcc_set_lib_path
2009-04-18 15:08:03 +02:00
grischka
73ba078d2f
tcc_relocate: return error and remove unused code
2009-04-18 15:08:03 +02:00
grischka
dd5630ff95
tcc -E: fix pasting empty tokens
...
/* test case */
#define t(x,y,z) x ## y ## z
int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
t(10,,), t(,11,), t(,,12), t(,,) };
tcc -E: xpected result:
int j[] = { 123, 45, 67, 89,
10, 11, 12, };
2009-04-18 15:08:02 +02:00
grischka
0f0ed4a8bf
tcc -E: preserve spaces, alternative solution
...
/* test case */
#define STR(x) #x
#define MKSTR(x) STR(x)
MKSTR(-A-)
MKSTR(+ B +)
tcc -E: expected result:
"-A-"
"+ B +"
2009-04-18 15:08:02 +02:00
grischka
90697c4c56
CONFIG_TCC_STATIC: add dummy for dlclose
2009-04-18 15:08:02 +02:00
grischka
d62301b050
avoid warning uninitialized
2009-04-18 15:08:02 +02:00
grischka
e6ba81b012
get rid of 8 bytes memory leak
2009-04-18 15:08:02 +02:00
grischka
b1697be691
change tcc_add/get_symbol to use void*
2009-04-18 15:08:02 +02:00
grischka
795f67428e
alternative int tcc_relocate(TCCState *s1, void *ptr);
2009-04-18 15:08:02 +02:00
grischka
9a8b2912ed
TOK_builtin_malloc: alternative solution
2009-04-18 15:08:02 +02:00
grischka
a9c78d04f2
win32: accept uppercase filename suffixes
2009-04-18 15:08:01 +02:00
grischka
6c10429aa5
check for absolute include paths
...
Suggested by Sandor Zsolt <narkoskatona@yahoo.com >
2009-04-18 15:07:28 +02:00
grischka
29c8e1545a
get rid of "free_section problem" with private sections
2009-04-18 15:07:28 +02:00
grischka
c80f81c199
tiny_libmaker: fix function array overflow
2009-04-18 15:07:28 +02:00
grischka
5818945ef6
accept "restrict" in array-decl (STDC 199901)
2009-04-18 15:07:27 +02:00
grischka
0e015988cc
i386: apply "align=8 for doubles ..." for PE only
2009-04-18 15:07:27 +02:00
grischka
4a8c2229ce
win32: allow user segments as writable & executable
2009-04-18 15:07:08 +02:00
grischka
3116744bdd
i386: align=8 for double and long long
2009-04-18 15:07:08 +02:00
grischka
b41fc95566
win32: fix for VC8Express compiler
2009-04-18 15:07:08 +02:00
grischka
64147b346b
fix constant optimization for unsigneds
2009-04-18 15:07:08 +02:00
grischka
7c3f19c079
fix data overflow with init_putv
...
The simplest code to reproduce this bug seems to be
int a[][] = {{1,1,1,1,1,1,1}};
2008-12-02 02:36:27 +01:00
grischka
83466c6151
line-numbers output for TCC -E
2008-11-30 07:21:01 +01:00
grischka
78f288bc87
win32/build-tcc.bat: define CONFIG_SYSROOT
2008-11-30 03:16:43 +01:00
grischka
7bebf1f59a
was hash, not link
2008-09-15 02:07:55 +02:00
grischka
7f51aa13e7
update changelog
2008-09-15 00:12:10 +02:00
grischka
2c6cd08bcc
fix isidnum_table for CH_EOF (-1)
2008-09-12 02:36:05 +02:00
grischka
1300cec38c
free_section bugfix
2008-09-12 02:36:01 +02:00