aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tcc-doc: remove obsolete '-o option must also be given'grischka2011-05-171-6/+4
|
* Fix calling ARM EABI functions returning big structuresDaniel Glöckner2011-05-171-1/+1
| | | | The wrong type was tested to determine the size of the structure.
* Support scratchbox, Nokia N900 and qemu arm archsThomas Preud'homme2011-05-161-1/+1
| | | | Add arm, armv5tejl and armv7l to the list of supported arm architectures
* Remove unused variablesThomas Preud'homme2011-05-162-0/+5
| | | | | Declare float type conditionally to not declare them conditionally when they are not used.
* Remove unused variablesThomas Preud'homme2011-05-164-8/+14
| | | | | Remove unused local variables and declare them conditionally when they are used only on some architectures.
* Improve weak aliases handlingThomas Preud'homme2011-05-161-17/+19
| | | | | | * Include only the STB_GLOBAL alias symbol in .dynsym section * Stop the loop when STB_GLOBAL symbol is found * Reword / simplify comment
* make clean work when LIBTCC1 not definedThomas Preud'homme2011-05-141-0/+2
| | | | | Don't call make -C lib clean if LIBTCC1 is not defined, else make clean fails (for example of arm).
* fix spurious vstack-leak warnings on errorJoe Soroka2011-05-021-3/+3
|
* libtcc.c: report vstack "leaks" only if compile succeededJoe Soroka2011-04-141-2/+3
|
* use of TOK_alloca breaks cross compiler buildJoe Soroka2011-04-121-0/+4
| | | | | | | | | | | VLA inserts a call to alloca via enum TOK_alloca, but TOK_alloca only exists on I386 and X86_64 targets. This patch just emits an error at compile-time if someone tries to compile some VLA code for a TOK_alloca-less target. The best solution might be to just push the problem to link-time, since the existence-or-not of a alloca implementation can only be determined by linking. It seems like just declaring TOK_alloca unconditionally would achieve that, but for now, this at least gets the cross compilers to build.
* tcctok.h: fix ifdef target/host confusionJoe Soroka2011-04-121-1/+1
|
* simplify/rollback VLA pointer subtractionJoe Soroka2011-04-111-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know if it makes a difference to gen_op(TOK_PDIV) or not, but logically the ptr1_is_vla test in TP's VLA patch seems out of order, where the patch to fix it would be: ------------------------------------------------------------------ @@ -1581,15 +1581,15 @@ ST_FUNC void gen_op(int op) u = pointed_size(&vtop[-1].type); } gen_opic(op); + if (ptr1_is_vla) + vswap(); /* set to integer type */ #ifdef TCC_TARGET_X86_64 vtop->type.t = VT_LLONG; #else vtop->type.t = VT_INT; #endif - if (ptr1_is_vla) - vswap(); - else + if (!ptr1_is_vla) vpushi(u); gen_op(TOK_PDIV); } else { ------------------------------------------------------------------ Instead of that patch, which increases the complexity of the code, this one fixes the problem by just rolling back and retrying with a simpler approach.
* update documentation to reflect VLA changesJoe Soroka2011-04-091-3/+3
|
* remove no-longer-necessary naive fix for vla vstack leakJoe Soroka2011-04-091-5/+0
|
* prevent internal segfault on apparent VLA at file scopeJoe Soroka2011-04-091-0/+2
|
* VLA fix [3/3]: store VLA sizeofs in anonymous runtime stack varsJoe Soroka2011-04-092-34/+22
|
* VLA fix [2/3]: removed VT_ARRAY from VT_VLA typesJoe Soroka2011-04-081-20/+11
| | | | | | | | | A VLA is not really an array, it's a pointer-to-an-array. Making this explicit allows us to back out a few parts of the original VLA patch and paves the way for the next part of the fix, where a VLA will be stored on the runtime stack as a pointer-to-an-array, rather than on the compile- time stack as a Sym*.
* VLA fix [1/3]: added testcase demonstrating VLA bugJoe Soroka2011-04-081-1/+6
|
* move a comment to its correct locationJoe Soroka2011-04-081-1/+1
|
* add naive workaround for VLA vstack leakJoe Soroka2011-04-081-0/+5
|
* VLA leaks vstack. added warning to detect future leaksJoe Soroka2011-04-081-0/+4
|
* VLA bcheck works via bound alloca; add test, remove warningJoe Soroka2011-04-062-4/+34
|
* clarify post_type() VT_STORAGE handling by moving it outJoe Soroka2011-04-061-7/+7
|
* re-apply VLA by Thomas Preud'hommeJoe Soroka2011-04-067-35/+173
|
* handle c99 flexible array members less hackilyJoe Soroka2011-03-181-1/+18
|
* revert complicated & broken flexible array member handlingJoe Soroka2011-03-182-21/+5
|
* sizeof(struct with "flexible array member") is wrongJoe Soroka2011-03-181-0/+1
|
* fix c99 for-loop init decl scope (thanks: grischka)Joe Soroka2011-03-082-0/+4
| | | | see http://lists.nongnu.org/archive/html/tinycc-devel/2011-03/msg00005.html
* clarify support for functions returning an array (try#2)Joe Soroka2011-03-081-4/+9
| | | | | fixes first attempt: http://repo.or.cz/w/tinycc.git/commitdiff/31fe1cc
* revert last commit. fails "make test"Joe Soroka2011-03-081-8/+5
| | | | | | | | | test target in Makefile does not depend on tcc. i'm not sure why, but i can think of at least one good reason. in my local tree I have it modified to do so, but somehow inadvertently reverted that so when i did "make test" before committing, it didn't actually test my changes. sorry.
* clarify support for functions returning an arrayJoe Soroka2011-03-081-5/+8
| | | | | | | | | previously, tcc would accept a prototype of a function returning an array, but not giving those functions bodies nor calling them. it seems that gcc has never supported them, so we should probably just error out... but it's possible that someone already using tcc includes some header that contains an unused prototype for one, so let's continue to support that.
* support c99 for-loop init decls (2nd attempt)Joe Soroka2011-03-081-3/+18
|
* partially revert e23194aJoe Soroka2011-03-082-20/+3
| | | | see http://lists.nongnu.org/archive/html/tinycc-devel/2011-03/msg00002.html
* revert last 3 commits. will find better way.Joe Soroka2011-03-081-96/+85
|
* small change to previous whitespace-only commitJoe Soroka2011-03-081-2/+2
|
* some indentation made prev patch pretty; removed itJoe Soroka2011-03-081-85/+81
|
* refactor post_type() to be explicit about its recursionJoe Soroka2011-03-081-5/+20
|
* added a note clarifying post_type() recursionJoe Soroka2011-03-081-0/+3
| | | | | | | | | some ancient pre-K&R C allows a function to return an array and the array brackets to be put after the arguments, such that "int c()[]" means the same as "int[] c()" see: http://llvm.org/bugs/show_bug.cgi?id=2399 http://java.sun.com/docs/books/jls/third_edition/html/classes.html#38703
* tccelf: allow multiply defined weak symbolsJoe Soroka2011-03-071-0/+2
|
* support c99 for-loop init declsJoe Soroka2011-03-074-4/+25
|
* use new weaken_symbol() to fix another real-world corner caseJoe Soroka2011-03-072-1/+4
|
* factor out symbol weakening into new functionJoe Soroka2011-03-071-10/+17
|
* weak redefinition of a symbol should weaken the originalJoe Soroka2011-03-072-0/+7
|
* __typeof(t) should not include storage modifiers of tJoe Soroka2011-03-062-0/+7
|
* tccpp: fix problem in preprocess_skip with empty #grischka2011-03-061-0/+2
| | | | | | | | for example: #ifdef stuff # /* some comment */ #endif
* unlink outfile firstChangming Xu2011-03-031-0/+1
| | | | file mode problem if the outfile already exists
* tccgen: handle __attribute((alias("target")))Joe Soroka2011-03-033-1/+27
|
* collapse branch in decl(), making way for next patchJoe Soroka2011-03-031-9/+9
|
* handle post-asm-label attributes on variablesJoe Soroka2011-03-032-25/+28
|
* tcc: fix weak attribute handlingJoe Soroka2011-03-022-6/+10
|