Commit Graph

43 Commits

Author SHA1 Message Date
Michael Matz
f775d68725 Remove a bit-field TODO
Checked the lcc testsuite for bitfield stuff (in cq.c and fields.c),
fixed one more error in initializing unnamed members (which have
to be skipped), removed the TODO.
2017-04-29 22:09:10 +02:00
grischka
2d3b9559bf tcctools.c: integrate tiny_libmaker/_impdef
usage:
    tcc -ar [rcsv] lib files...
    tcc -impdef lib.dll [-v] [-o lib.def]

also:
- support more files with -c: tcc -c f1.c f2.c ...
- fix a bug which caused tcc f1.c f2.S to produce no asm
- allow tcc -ar @listfile too
- change prototype: _void_ tcc_set_options(...)
- apply -Wl,-whole-archive when a librariy is given
  as libxxx.a also (not just for -lxxx)
2017-02-18 09:55:34 +01:00
grischka
43d9a7de9b updates & cleanups (tcc-doc/Changelog/TODO ...)
- tcc-doc.texi: commandline option info update
- Changelog/TODO: update
- tests/tcctest.py: removed
- tests/Makefile: weaktest fixed
- tests/tests2: some files renamed and/or converted to unix LF
- configure/Makefile: --enable-static option (no dll on win32)
- win32/build-tcc.bat: msvc support
- win32/tcc-win32.txt: build info update
- win32/vs2015/: VS solution removed
- win32/include/tcc/tcc_libm.h: #include statement fixed
- tcc.c: -include <file> option help info
- .gitignore: cleanup
2017-02-13 19:03:29 +01:00
Edmund Grimley Evans
f5f82abc99 Insert spaces between certain tokens when tcc is invoked with -E.
Insert a space when it is required to prevent mistokenisation of
the output, and also in a few cases where it is not strictly
required, imitating GCC's behaviour.
2016-05-09 19:27:31 +01:00
Edmund Grimley Evans
68ce8639bb TODO: Add two issues. 2016-04-24 22:44:57 +01:00
Edmund Grimley Evans
1c2dfa1f4b Change the way struct CStrings are handled.
A CString used to be copied into a token string, which is an int array.
On a 64-bit architecture the pointers were misaligned, so ASan gave
lots of warnings. On a 64-bit architecture that required memory
accesses to be correctly aligned it would not work at all.

The CString is now included in CValue instead.
2015-11-26 12:40:50 +00:00
Edmund Grimley Evans
4886d2c640 TODO: Add two issues. 2015-11-26 12:31:23 +00:00
Edmund Grimley Evans
cfef9ac3f5 TODO: Add note on handling of floating-point values. 2015-11-21 10:35:47 +00:00
Edmund Grimley Evans
dd40d6a068 TODO: Add some issues. 2015-11-21 00:04:58 +00:00
Edmund Grimley Evans
3ff77a1d6f Improve constant propagation with "&&" and "||". 2015-11-20 23:33:49 +00:00
gus knight
89ad24e7d6 Revert all of my changes to directories & codingstyle. 2015-07-29 16:57:12 -04:00
gus knight
47e06c6d4e Reorganize the source tree.
* Documentation is now in "docs".
 * Source code is now in "src".
 * Misc. fixes here and there so that everything still works.

I think I got everything in this commit, but I only tested this
on Linux (Make) and Windows (CMake), so I might've messed
something up on other platforms...
2015-07-27 16:03:25 -04:00
Urs Janssen
0db7f616ad remove doubled prototype
fix documentation about __TINYC__
define __STDC_HOSTED__ like __STDC__
2013-02-18 15:44:18 +01:00
Joe Soroka
ace0f7f259 re-apply VLA by Thomas Preud'homme 2011-04-06 09:17:03 -07:00
Thomas Preud'homme
db560e9439 Revert "Implement C99 Variable Length Arrays"
This reverts commit a5a50eaafe.
2011-02-05 02:33:46 +01:00
Thomas Preud'homme
a5a50eaafe Implement C99 Variable Length Arrays
Implement C99 Variable Length Arrays in tinycc:
- Support VLA with multiple level (nested vla)
- Update documentation with regards to VT_VLA
- Add a testsuite in tcctest.c
2011-02-04 02:22:25 +01:00
Kirill Smelkov
0c928da96d tcc: Draft suppoprt for -MD/-MF options
In build systems, this is used to automatically collect target
dependencies, e.g.

    ---- 8< (hello.c) ----
    #include "hello.h"
    #include <stdio.h>

    int main()
    {
        printf("Hello World!\n");
        return 0;
    }

$ tcc -MD -c hello.c    # -> hello.o, hello.d
$ cat hello.d
hello.o : \
        hello.c \
        hello.h \
        /usr/include/stdio.h \
        /usr/include/features.h \
        /usr/include/bits/predefs.h \
        /usr/include/sys/cdefs.h \
        /usr/include/bits/wordsize.h \
        /usr/include/gnu/stubs.h \
        /usr/include/bits/wordsize.h \
        /usr/include/gnu/stubs-32.h \
        /home/kirr/local/tcc/lib/tcc/include/stddef.h \
        /usr/include/bits/types.h \
        /usr/include/bits/wordsize.h \
        /usr/include/bits/typesizes.h \
        /usr/include/libio.h \
        /usr/include/_G_config.h \
        /usr/include/wchar.h \
        /home/kirr/local/tcc/lib/tcc/include/stdarg.h \
        /usr/include/bits/stdio_lim.h \
        /usr/include/bits/sys_errlist.h \

NOTE: gcc supports -MD only for .c -> .o, but in tcc, we generate
dependencies for whatever action is being taken. E.g. for .c -> exe, the
result will be:

$ tcc -MD -o hello hello.c  # -> hello, hello.d
hello: \
        /usr/lib/crt1.o \
        /usr/lib/crti.o \
        hello.c \
        hello.h \
        /usr/include/stdio.h \
        /usr/include/features.h \
        /usr/include/bits/predefs.h \
        /usr/include/sys/cdefs.h \
        /usr/include/bits/wordsize.h \
        /usr/include/gnu/stubs.h \
        /usr/include/bits/wordsize.h \
        /usr/include/gnu/stubs-32.h \
        /home/kirr/local/tcc/lib/tcc/include/stddef.h \
        /usr/include/bits/types.h \
        /usr/include/bits/wordsize.h \
        /usr/include/bits/typesizes.h \
        /usr/include/libio.h \
        /usr/include/_G_config.h \
        /usr/include/wchar.h \
        /home/kirr/local/tcc/lib/tcc/include/stdarg.h \
        /usr/include/bits/stdio_lim.h \
        /usr/include/bits/sys_errlist.h \
        /usr/lib/libc.so \
        /lib/libc.so.6 \
        /usr/lib/ld-linux.so.2 \
        /lib/ld-linux.so.2 \
        /usr/lib/libc_nonshared.a \
        /lib/libc.so.6 \
        /usr/lib/libc_nonshared.a \
        /home/kirr/local/tcc/lib/tcc/libtcc1.a \
        /usr/lib/crtn.o \

So tcc dependency generator is a bit more clever than one used in gcc :)

Also, I've updated TODO and Changelog (in not-yet-released section).

v2:

(Taking inputs from grischka and me myself)

- put code to generate deps file into a function.
- used tcc_fileextension() instead of open-coding
- generate deps only when compilation/preprocessing was successful

v3:

- use pstrcpy instead of snprintf(buf, sizeof(buf), "%s", ...)
2010-06-21 20:49:02 +04:00
grischka
265dddbecf Udated and cleaned up TODO. 2008-01-16 22:33:56 +00:00
grischka
3667408a57 Just warn about unknown directives, define __STDC_VERSION__=199901L 2008-01-16 20:16:35 +00:00
bellard
1c1919072b update 2004-11-07 15:51:57 +00:00
bellard
2a6c104722 update 2004-10-23 23:11:05 +00:00
bellard
b7f12dfbdf update 2003-10-04 21:29:04 +00:00
bellard
4e6edcdcdd update 2003-05-24 16:12:58 +00:00
bellard
0d6f8021ee update 2003-04-14 22:23:55 +00:00
bellard
dd56ab8c77 added configure support 2003-04-13 19:50:35 +00:00
bellard
75e743d23e update 2003-01-06 20:19:20 +00:00
bellard
dc685c6b7d update 2002-12-08 14:34:02 +00:00
bellard
122198a8c2 update 2002-11-24 15:58:28 +00:00
bellard
6cd2d5d2c8 update 2002-11-03 00:44:38 +00:00
bellard
10f5d44f43 update 2002-09-08 22:13:54 +00:00
bellard
bc427f5bec update 2002-08-31 12:44:16 +00:00
bellard
5370be48e2 updated 2002-08-18 14:44:08 +00:00
bellard
524be938fd updated 2002-08-18 14:34:02 +00:00
bellard
840d197e87 update 2002-07-24 22:13:02 +00:00
bellard
e5de65fcec update 2002-02-10 16:15:08 +00:00
bellard
ebe9e87ccf update 2002-01-05 19:50:17 +00:00
bellard
b0b2d5d2e9 update 2001-12-17 21:57:01 +00:00
bellard
a88b855866 update 2001-12-02 21:44:40 +00:00
bellard
34a14a08a3 update 2001-11-18 16:33:35 +00:00
bellard
4dceee3677 update 2001-11-11 22:51:50 +00:00
bellard
eb0e3e70dc update 2001-11-11 18:01:29 +00:00
bellard
58f3296a6e updated 2001-10-28 15:29:01 +00:00
bellard
27f6e16bae Initial revision 2001-10-27 23:48:39 +00:00