mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
update
This commit is contained in:
parent
923627f030
commit
6cd2d5d2c8
2
Makefile
2
Makefile
@ -13,7 +13,7 @@ CFLAGS+=-m386 -malign-functions=0
|
|||||||
CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\"
|
CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\"
|
||||||
DISAS=objdump -d
|
DISAS=objdump -d
|
||||||
INSTALL=install
|
INSTALL=install
|
||||||
VERSION=0.9.12
|
VERSION=0.9.13
|
||||||
|
|
||||||
# run local version of tcc with local libraries and includes
|
# run local version of tcc with local libraries and includes
|
||||||
TCC=./tcc -B. -I.
|
TCC=./tcc -B. -I.
|
||||||
|
13
TODO
13
TODO
@ -1,20 +1,19 @@
|
|||||||
TODO list:
|
TODO list:
|
||||||
|
|
||||||
- To fix: 'sizeof' generates code if too complex expression is given.
|
|
||||||
- add gcc extension typeof()
|
|
||||||
- add gcc extension __alignof__()
|
|
||||||
- fix constant error msg
|
|
||||||
- add 'CType' structure to optimize type handling (= compile even faster)
|
- add 'CType' structure to optimize type handling (= compile even faster)
|
||||||
- suppress unneeded hash table for Symbols (= compile even faster)
|
- suppress unneeded hash table for Symbols (= compile even faster)
|
||||||
- add alloca()
|
- add alloca()
|
||||||
- ignore at least asm extension
|
- implement minimal 'asm' extension
|
||||||
- setjmp is not supported properly in bound checking.
|
- setjmp is not supported properly in bound checking.
|
||||||
- better local variables handling (needed for other targets)
|
- better local variables handling (needed for other targets)
|
||||||
- fix bound check code with '&' on local variables (currently done
|
- fix bound check code with '&' on local variables (currently done
|
||||||
only for local arrays).
|
only for local arrays).
|
||||||
- To check: bound checking and float/long long/struct copy code. bound
|
- sizeof, alignof, typeof can still generate code in some cases.
|
||||||
|
- bound checking and float/long long/struct copy code. bound
|
||||||
checking and symbol + offset optimization
|
checking and symbol + offset optimization
|
||||||
- free all allocated data and use longjmp for errors (useful for libtcc use)
|
- Fix the remaining libtcc memory leaks.
|
||||||
|
- make libtcc fully reentrant (except for the compilation stage itself).
|
||||||
|
- '-MD' option
|
||||||
|
|
||||||
Not critical:
|
Not critical:
|
||||||
|
|
||||||
|
58
tcc-doc.texi
58
tcc-doc.texi
@ -37,7 +37,7 @@ generation (@xref{libtcc}).
|
|||||||
|
|
||||||
@example
|
@example
|
||||||
usage: tcc [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym]
|
usage: tcc [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym]
|
||||||
[-g] [-b] [-Ldir] [-llib] [-shared] [-static]
|
[-g] [-b] [-bt N] [-Ldir] [-llib] [-shared] [-static]
|
||||||
[--] infile1 [infile2... --] [infile_args...]
|
[--] infile1 [infile2... --] [infile_args...]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@ -131,21 +131,6 @@ also be defined: @code{'-DF(a)=a+1'}
|
|||||||
Undefine preprocessor symbol 'sym'.
|
Undefine preprocessor symbol 'sym'.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
C compiler options:
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item -g
|
|
||||||
Generate run time debug information so that you get clear run time
|
|
||||||
error messages: @code{ test.c:68: in function 'test5()': dereferencing
|
|
||||||
invalid pointer} instead of the laconic @code{Segmentation
|
|
||||||
fault}.
|
|
||||||
|
|
||||||
@item -b
|
|
||||||
Generate additionnal support code to check
|
|
||||||
memory allocations and array/pointer bounds. '-g' is implied. Note
|
|
||||||
that the generated code is slower and bigger in this case.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Linker options:
|
Linker options:
|
||||||
|
|
||||||
@table @samp
|
@table @samp
|
||||||
@ -172,19 +157,36 @@ also be given).
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
Debugger options:
|
||||||
|
|
||||||
|
@table @samp
|
||||||
|
@item -g
|
||||||
|
Generate run time debug information so that you get clear run time
|
||||||
|
error messages: @code{ test.c:68: in function 'test5()': dereferencing
|
||||||
|
invalid pointer} instead of the laconic @code{Segmentation
|
||||||
|
fault}.
|
||||||
|
|
||||||
|
@item -b
|
||||||
|
Generate additionnal support code to check
|
||||||
|
memory allocations and array/pointer bounds. @samp{-g} is implied. Note
|
||||||
|
that the generated code is slower and bigger in this case.
|
||||||
|
|
||||||
|
@item -bt N
|
||||||
|
Display N callers in stack traces. This is useful with @samp{-g} or
|
||||||
|
@samp{-b}.
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
Note: GCC options @samp{-Ox}, @samp{-Wx}, @samp{-fx} and @samp{-mx} are
|
||||||
|
ignored.
|
||||||
|
|
||||||
@chapter C language support
|
@chapter C language support
|
||||||
|
|
||||||
@section ANSI C
|
@section ANSI C
|
||||||
|
|
||||||
TCC implements all the ANSI C standard, including structure bit fields
|
TCC implements all the ANSI C standard, including structure bit fields
|
||||||
and floating point numbers (@code{long double}, @code{double}, and
|
and floating point numbers (@code{long double}, @code{double}, and
|
||||||
@code{float} fully supported). The following limitations are known:
|
@code{float} fully supported).
|
||||||
|
|
||||||
@itemize
|
|
||||||
@item The preprocessor tokens are the same as C. It means that in some
|
|
||||||
rare cases, preprocessed numbers are not handled exactly as in ANSI
|
|
||||||
C. This approach has the advantage of being simpler and FAST!
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@section ISOC99 extensions
|
@section ISOC99 extensions
|
||||||
|
|
||||||
@ -320,6 +322,16 @@ generate function @code{'my_add'} in section @code{.mycodesection}.
|
|||||||
(so it has not exactly the same semantics as string literal GNUC
|
(so it has not exactly the same semantics as string literal GNUC
|
||||||
where it is a string literal).
|
where it is a string literal).
|
||||||
|
|
||||||
|
@item The @code{__alignof__} keyword can be used as @code{sizeof}
|
||||||
|
to get the alignment of a type or an expression.
|
||||||
|
|
||||||
|
@item The @code{typeof(x)} returns the type of @code{x}.
|
||||||
|
@code{x} is an expression or a type.
|
||||||
|
|
||||||
|
@item Computed gotos: @code{&&label} returns a pointer of type
|
||||||
|
@code{void *} on the goto label @code{label}. @code{goto *expr} can be
|
||||||
|
used to jump on the pointer resulting from @code{expr}.
|
||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@section TinyCC extensions
|
@section TinyCC extensions
|
||||||
|
Loading…
Reference in New Issue
Block a user