| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
With this option on a defines are included into the output
(inside comments). This will allow to debug a problems like:
In file included from math.c:8:
In file included from /usr/include/math.h:43:
/usr/include/bits/nan.h:52: warning: NAN redefined
|
| |
|
|
|
|
|
|
|
|
|
| |
tcc -E -P
do not output a #line directive, a gcc compatible option
tcc -E -P1
don't follow a gcc preprocessor style and do output a standard
#line directive. In such case we don't lose a location info when
we going to compile a resulting file wtith a compiler not
understanding a gnu style line info.
|
| |
|
|
|
|
|
| |
BufferedFile.
This id needed for a right ouput in other places,
precisely to calculate a number of empty lines which are waiting to output.
|
| |
|
|
|
|
|
|
|
|
|
| |
FILENAME"
A cpp from gcc do this.
A test case:
tcc -E tccasm.c -o tccasm.i
tcc -E tccasm.i -o tccasm.ii
After a patch the line numbers in tccasm.ii are the same
as in tccasm.i
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Either this fix, or an alternative one, is required for arm64.
|
| |
|
|
|
|
|
| |
This adds some more support for properly transfering some
offsets over the different stages of a relocations life.
Still not at all psABI compliant and DSOs can't yet be generated.
But it runs the testsuite in qemu-arm64.
|
| | |
|
| |
|
|
|
|
|
| |
libtcc.c: Add greloca, a generalisation of greloc that takes an addend.
tcc.h: Add greloca and put_elf_reloca.
tccelf.c: Add put_elf_reloca, a generalisation of put_elf_reloc.
tccgen.c: On x86_64, use greloca instead of greloc in init_putv.
|
| |
|
|
| |
And delete the sentence about it being removed.
|
| |
|
|
|
|
| |
The back end functions gen_op(comparison) and gtst() might allocate
registers so case_reg should be left on the value stack while they
are called and set again afterwards.
|
| |
|
|
| |
Make integer constant parsing C99 compliant
|
| |
|
|
| |
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
|
| |
|
|
| |
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
|
| |
|
|
|
|
|
| |
Chances a cross-compiler will find a working crt*.o
in /usr/lib are more or less 0.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
|
| |
|
|
| |
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
|
| |
|
|
|
|
| |
PS: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20101122/112576.html
This is fix PR8686 for llvm: accepting a 'b' suffix at the end
of all the setcc instructions.
|
| |
|
|
| |
Try "tcc -E -c tccasm.c -o tccasm.o"
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a ".i" extension as alias for ".c"
GCC and file extensions:
.i C source code which should not be preprocessed.
Before a patch:
./tcc -E tccasm.c -o tccasm.i
./tcc -c tccasm.i -o tccasm.o
tccasm.i:1: error: unrecognized file type
|
| |
|
|
| |
gcc complain but work right and tcc simply fail to compile right.
|
| | |
|
| |
|
|
|
|
|
| |
* tccpp.c (parse_number): `shift' should be 1 while parsing binary
floating point number.
* tests/tests2/70_floating_point_literals.c: New test cases for
floating point number parsing.
|
| |
|
|
|
| |
The memory needed by `buffer' will be allocated in `tcc_open_bf',
these is no need to allocate them in BufferedFile statically.
|
| |
|
|
|
| |
After leaving the code block that `buf' is defined, `buf' will not
exist, so `name' will point to a variable that does not exist.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This includes windows.h to fix a warning about
an implicit function usage of ExitProcess().
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test case:
#include <stdio.h>
int main(int argc, char **argv)
{
struct _s { unsigned a:9, b:5, c:7; } _s, *s = &_s;
int n = 250;
s->a = s->b = s->c = n + 4;
printf("--> %d / %d / %d\n", s->a, s->b, s->c);
return 0;
}
before:
--> 254 / 30 / 126
now:
--> 30 / 30 / 126
|
| |
|
|
|
|
|
| |
Don't override CPPFLAGS so that it can be passed through the
environment.
(This is a patch Thomas Preud'homme wrote for Debian in February 2013.)
|
| |
|
|
| |
This fixes compilation on (k)FreeBSD.
|
| |
|
|
|
|
| |
Clear CFLAGS and LDFLAGS to build the tests, in case the main Makefile
passes some flags that aren't handled by tcc (we are not compiling tcc
here, we are using tcc to compile the tests).
|
| |
|
|
|
|
|
| |
Prevent libtcc1.a to be compiled with -fstack-protector-strong, so that
linking with tcc doesn't fail because symbol '__stack_chk_fail_local' is
not present in libtcc1.a. This is useful only if the CFLAGS passed from
the main Makefile contain this flag.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This for example suppresses string constants such as with
int main()
{
return sizeof "foo";
}
Actually, setting
nocode_wanted = 1;
in libtcc.c for the initial global level seemed wrong, since
obviously "nocode_wanted" means code as any side effects, also
such as string constants.
This reverts a part of 2de1b2d14cc920e2c698ff0086f5558c2da7f569
(documented as "Some in-between fixes" in Changelog)
|
| | |
|
| | |
|
| |
|
|
| |
untouched, also argc. Added a if checking the result of it.
|
| |
|
|
| |
DWORD boundary and it becomes 0x80000000. Jle treats as -214783648, but Jbe treats as 214783648. Thanks to Jason Hood for explain me this.
|
| |
|
|
| |
handler function, when try to allocate INT_MAX. Patch provided by Jason Hood in private e-mail, when I ask to him for help. He say: Feel free to pass it on to the mailing list.
|