Trim trailing spaces everywhere.
This commit is contained in:
46
tcc-doc.texi
46
tcc-doc.texi
@ -99,9 +99,9 @@ the @code{main()} of a.c.
|
||||
|
||||
@item @samp{tcc a.c -run b.c arg1}
|
||||
Compile @file{a.c} and @file{b.c}, link them together and execute them. arg1 is given
|
||||
as first argument to the @code{main()} of the resulting program.
|
||||
@ignore
|
||||
Because multiple C files are specified, @option{--} are necessary to clearly
|
||||
as first argument to the @code{main()} of the resulting program.
|
||||
@ignore
|
||||
Because multiple C files are specified, @option{--} are necessary to clearly
|
||||
separate the program arguments from the TCC options.
|
||||
@end ignore
|
||||
|
||||
@ -136,14 +136,14 @@ need to add @code{#!/usr/local/bin/tcc -run} at the start of your C source:
|
||||
#!/usr/local/bin/tcc -run
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
int main()
|
||||
@{
|
||||
printf("Hello World\n");
|
||||
return 0;
|
||||
@}
|
||||
@end example
|
||||
|
||||
TCC can read C source code from @emph{standard input} when @option{-} is used in
|
||||
TCC can read C source code from @emph{standard input} when @option{-} is used in
|
||||
place of @option{infile}. Example:
|
||||
|
||||
@example
|
||||
@ -271,7 +271,7 @@ Make string constants be of type @code{const char *} instead of @code{char
|
||||
@item -Werror
|
||||
Abort compilation if warnings are issued.
|
||||
|
||||
@item -Wall
|
||||
@item -Wall
|
||||
Activate all warnings, except @option{-Werror}, @option{-Wunusupported} and
|
||||
@option{-Wwrite-strings}.
|
||||
|
||||
@ -451,7 +451,7 @@ function name.
|
||||
|
||||
int tab[10] = @{ 1, 2, [5] = 5, [9] = 9@};
|
||||
@end example
|
||||
|
||||
|
||||
@item Compound initializers are supported:
|
||||
@example
|
||||
int *p = (int [])@{ 1, 2, 3 @};
|
||||
@ -465,7 +465,7 @@ works for structures and strings.
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
is the same as writing
|
||||
is the same as writing
|
||||
@example
|
||||
double d = 4771840.0;
|
||||
@end example
|
||||
@ -481,12 +481,12 @@ TCC implements some GNU C extensions:
|
||||
|
||||
@itemize
|
||||
|
||||
@item array designators can be used without '=':
|
||||
@item array designators can be used without '=':
|
||||
@example
|
||||
int a[10] = @{ [0] 1, [5] 2, 3, 4 @};
|
||||
@end example
|
||||
|
||||
@item Structure field designators can be a label:
|
||||
@item Structure field designators can be a label:
|
||||
@example
|
||||
struct @{ int x, y; @} st = @{ x: 1, y: 1@};
|
||||
@end example
|
||||
@ -555,7 +555,7 @@ Here are some examples:
|
||||
align variable @code{a} to 8 bytes and put it in section @code{.mysection}.
|
||||
|
||||
@example
|
||||
int my_add(int a, int b) __attribute__ ((section(".mycodesection")))
|
||||
int my_add(int a, int b) __attribute__ ((section(".mycodesection")))
|
||||
@{
|
||||
return a + b;
|
||||
@}
|
||||
@ -572,17 +572,17 @@ generate function @code{my_add} in section @code{.mycodesection}.
|
||||
dprintf("one arg %d\n", 1);
|
||||
@end example
|
||||
|
||||
@item @code{__FUNCTION__} is interpreted as C99 @code{__func__}
|
||||
@item @code{__FUNCTION__} is interpreted as C99 @code{__func__}
|
||||
(so it has not exactly the same semantics as string literal GNUC
|
||||
where it is a string literal).
|
||||
|
||||
@item The @code{__alignof__} keyword can be used as @code{sizeof}
|
||||
@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}.
|
||||
@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
|
||||
@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}.
|
||||
|
||||
@ -616,7 +616,7 @@ TCC includes its own x86 inline assembler with a @code{gas}-like (GNU
|
||||
assembler) syntax. No intermediate files are generated. GCC 3.x named
|
||||
operands are supported.
|
||||
|
||||
@item @code{__builtin_types_compatible_p()} and @code{__builtin_constant_p()}
|
||||
@item @code{__builtin_types_compatible_p()} and @code{__builtin_constant_p()}
|
||||
are supported.
|
||||
|
||||
@item @code{#pragma pack} is supported for win32 compatibility.
|
||||
@ -681,7 +681,7 @@ same as C.
|
||||
@item +, -
|
||||
@end enumerate
|
||||
|
||||
@item A value is either an absolute number or a label plus an offset.
|
||||
@item A value is either an absolute number or a label plus an offset.
|
||||
All operators accept absolute values except '+' and '-'. '+' or '-' can be
|
||||
used to add an offset to a label. '-' supports two labels only if they
|
||||
are the same or if they are both defined and in the same section.
|
||||
@ -694,7 +694,7 @@ are the same or if they are both defined and in the same section.
|
||||
|
||||
@item All labels are considered as local, except undefined ones.
|
||||
|
||||
@item Numeric labels can be used as local @code{gas}-like labels.
|
||||
@item Numeric labels can be used as local @code{gas}-like labels.
|
||||
They can be defined several times in the same source. Use 'b'
|
||||
(backward) or 'f' (forward) as suffix to reference them:
|
||||
|
||||
@ -901,7 +901,7 @@ Here are some examples of caught errors:
|
||||
@chapter The @code{libtcc} library
|
||||
|
||||
The @code{libtcc} library enables you to use TCC as a backend for
|
||||
dynamic code generation.
|
||||
dynamic code generation.
|
||||
|
||||
Read the @file{libtcc.h} to have an overview of the API. Read
|
||||
@file{libtcc_test.c} to have a very simple example.
|
||||
@ -941,10 +941,10 @@ except:
|
||||
|
||||
@itemize
|
||||
|
||||
@item For initialized arrays with unknown size, a first pass
|
||||
@item For initialized arrays with unknown size, a first pass
|
||||
is done to count the number of elements.
|
||||
|
||||
@item For architectures where arguments are evaluated in
|
||||
@item For architectures where arguments are evaluated in
|
||||
reverse order, a first pass is done to reverse the argument order.
|
||||
|
||||
@end itemize
|
||||
@ -1156,7 +1156,7 @@ stack.
|
||||
@item VT_CMP
|
||||
indicates that the value is actually stored in the CPU flags (i.e. the
|
||||
value is the consequence of a test). The value is either 0 or 1. The
|
||||
actual CPU flags used is indicated in @code{SValue.c.i}.
|
||||
actual CPU flags used is indicated in @code{SValue.c.i}.
|
||||
|
||||
If any code is generated which destroys the CPU flags, this value MUST be
|
||||
put in a normal register.
|
||||
@ -1176,7 +1176,7 @@ taken.
|
||||
@item VT_LVAL
|
||||
is a flag indicating that the value is actually an lvalue (left value of
|
||||
an assignment). It means that the value stored is actually a pointer to
|
||||
the wanted value.
|
||||
the wanted value.
|
||||
|
||||
Understanding the use @code{VT_LVAL} is very important if you want to
|
||||
understand how TCC works.
|
||||
|
||||
Reference in New Issue
Block a user