aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
Commit message (Collapse)AuthorAgeFilesLines
* Display error on statement expressions with complex return typeDaniel Glöckner2008-09-121-0/+14
| | | | | | | | | | | The return type of a statement expression (a GCC extention) may involve elements on the symbol stack that have been put there by the expression. These will be freed at the end of the expression so that the calling block can not use them. Contrary to the comment (written in 2003), this bug no longer shows up in Valgrind, as freed symbols are now put onto a stack for later reuse.
* Fix bitfields with non-int types and in unionsDaniel Glöckner2008-09-121-8/+28
| | | | | | | | | | | | | | | | | The ISO C draft allow only signed/unsigned int and _Bool as base type for bitfields. TinyCC ever since allowed a wider range of types, but there were many bugs that shifted values when they shouldn't, etc.. The patch introduces a restriction to the layout of bitfields with mixed types that makes it incompatible with GCC. In struct { typeA x:1; typeB y:1; }; y is combined with x in the same byte iff typeA is typeB (neglecting signedness). This is done to avoid alignment issues and exceeding the width of typeA.
* Force null pointer exception for code outside of a functionDaniel Glöckner2008-09-121-0/+3
| | | | | | | | | | TinyCC sometimes has problems to evaluate constant expressions at compile time. This leads to code being generated outside of functions. Without this patch some of these bugs are not caught, because cur_text_section still points to the section of the last function. Before the first function cur_text_section is uninitialized. Setting cur_text_section to a null pointer should make TinyCC die in all cases.
* Optimize arithmetic with pointer to value on stack + constantDaniel Glöckner2008-09-121-2/+3
|
* Fix gv for long longsDaniel Glöckner2008-09-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | long long a(); long long b() { return a(); } At the end of b there will be some useless register shuffling. This is because return wants to have the result of a in REG_IRET. gv checks if this is the case for BOTH registers of the long long. After this test it uses REG_LRET for the second register if the first is supposed to be REG_IRET. In other cases it uses RC_INT. The patch compares the second register against the class it will have in the end instead of the register class the first register will have. At this point I would like to remind those who pick up the patches that there are two other mails by me with uncommitted fixes: http://lists.gnu.org/archive/html/tinycc-devel/2003-10/msg00044.html http://lists.gnu.org/archive/html/tinycc-devel/2008-08/msg00007.html Daniel
* A prefix for default library/include search pathsDaniel Glöckner2008-09-121-6/+6
| | | | | | | | | This patch is useful for cross compilers. Without this patch tcc tries to use the host's libraries, crt*.o and include files. The patch prepends a string to all default paths. The string can be passed to configure with --sysroot=string. Daniel
* Runtime lib functionsDaniel Glöckner2008-09-121-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Yesterday I felt the urge to change a few things in TinyCC. This is the first and biggest change of all of them. - use __aeabi_*divmod functions in ARM EABI to make binaries depend solely on standardized library functions - refactor ARM floating point <-> integer conversion a bit - rename long long->float and shift library functions to correspond to the names used by GCC - compile more tokens conditionally to reduce the size of TinyCC The intention is primarily to allow users of the ARM target to use libgcc (which is usually available as a shared library) instead of libtcc1 (which can't be compiled for ARM due to lack of an inline assembler). Changing the EABI target to use the divmod functions in theory allows to use it without libtcc1 on any (not necessarily GCC based) ARM EABI system. Daniel
* fix isidnum_table for CH_EOF (-1)grischka2008-09-121-5/+5
|
* free_section bugfixgrischka2008-09-121-2/+2
|
* release loaded dlls cleanly (Sam K)grischka2008-05-051-2/+11
|
* enable pe-output from libtcc (Shmuel Zeigerman)grischka2008-05-051-7/+0
|
* fix options in C scripts after -rungrischka2008-04-271-17/+14
|
* fix stabstr with linked objectsgrischka2008-04-271-0/+2
|
* enable multiple states and fix minor memory leaksgrischka2008-04-271-16/+48
|
* update manual, changeloggrischka2008-03-311-0/+2
|
* added verbosity levels (-vv -vvv)grischka2008-03-311-13/+24
|
* Accept standard input as an inputstream (Hanzac Chen)grischka2008-03-311-8/+9
|
* Add -soname linker option (Marc Andre Tanner)grischka2008-03-251-2/+11
|
* Enable -B option for library path on win32grischka2008-03-081-9/+9
|
* Just warn about unknown directives, define __STDC_VERSION__=199901Lgrischka2008-01-161-14/+22
|
* Switch to newer tccpe.c (includes support for resources)grischka2007-12-191-135/+174
|
* Handle backslashes within #include, #error, #warninggrischka2007-12-171-8/+21
|
* Import changesets (part 4) 428,457,460,467: defines for openbsd etc.grischka2007-12-161-4/+10
|
* Use _WIN32 for a windows hosted tcc and define it for the PE target.grischka2007-12-131-48/+52
|
* Import 409,410: ARM EABI by Daniel Glöcknergrischka2007-12-041-0/+59
|
* Some in-between fixes (See Changelog for details).grischka2007-11-251-66/+68
|
* Import more changesets from Rob Landley's fork (part 2)grischka2007-11-211-67/+92
|
* Import some changesets from Rob Landley's fork (part 1)grischka2007-11-141-59/+97
|
* fixed sign extension in some type conversions (Dave Dodge)bellard2006-10-281-0/+4
|
* fixed multiple typedef specifiers handlingbellard2006-10-281-0/+1
|
* workaround for function pointers in conditional expressions (Dave Dodge)bellard2006-10-281-0/+3
|
* discard type qualifiers when comparing function parameters (Dave Dodge)bellard2006-10-281-4/+26
|
* fixed multiple concatenation of PPNUM tokens (initial patch by Dave Dodge)bellard2006-10-281-1/+4
|
* initial implementation of -E optionbellard2006-10-161-11/+84
|
* fixed parsing of function parametersbellard2005-09-031-26/+30
|
* anonymous union/struct support (Filip Navara)bellard2005-09-031-3/+14
|
* windows style fastcall (Filip Navara)bellard2005-09-031-0/+6
|
* normalized slashes in paths (Filip Navara)bellard2005-09-031-0/+5
|
* added support for win32 wchar_t (Filip Navara)bellard2005-09-031-9/+27
|
* fixed function type checkbellard2005-09-031-2/+2
|
* mark executable sections as executable when running in memorybellard2005-09-031-1/+31
|
* preprocessor function macro parsing fix (grischka) - disabled ↵bellard2005-06-171-12/+32
| | | | -fleading-underscore for win32
* added -f[no-]leading-underscore - '@' symbol for asmbellard2005-06-151-3/+22
|
* win32 merge (grischka)bellard2005-04-171-10/+21
|
* win32 mergebellard2005-04-141-2/+13
|
* #pragma pack support (grischka)bellard2005-04-131-4/+65
|
* #include_next support (Bernhard Fischer)bellard2005-04-101-4/+13
|
* initial PE format supportbellard2005-04-101-12/+88
|
* better gcc compatibility (Jon Griffiths)bellard2004-12-161-1/+3
|
* optimisations: hash table for include file search, pool for symbol ↵bellard2004-11-071-74/+111
| | | | allocation - sympler token string allocation - '-b' fix with '-run' option