Joe Soroka
c94f80502e
VLA bcheck works via bound alloca; add test, remove warning
2011-04-06 15:27:45 -07:00
Joe Soroka
810aca9e68
clarify post_type() VT_STORAGE handling by moving it out
2011-04-06 12:08:50 -07:00
Joe Soroka
ace0f7f259
re-apply VLA by Thomas Preud'homme
2011-04-06 09:17:03 -07:00
Joe Soroka
17571298f3
handle c99 flexible array members less hackily
2011-03-18 17:50:42 -07:00
Joe Soroka
06a7c415a9
revert complicated & broken flexible array member handling
2011-03-18 17:47:35 -07:00
Joe Soroka
4062d787da
sizeof(struct with "flexible array member") is wrong
2011-03-18 17:45:43 -07:00
Joe Soroka
0b8aa909a3
fix c99 for-loop init decl scope (thanks: grischka)
...
see http://lists.nongnu.org/archive/html/tinycc-devel/2011-03/msg00005.html
2011-03-08 15:19:54 -08:00
Joe Soroka
9ff91d4c6f
clarify support for functions returning an array (try#2)
...
fixes first attempt:
http://repo.or.cz/w/tinycc.git/commitdiff/31fe1cc
2011-03-08 15:12:09 -08:00
Joe Soroka
91163f167e
revert last commit. fails "make test"
...
test target in Makefile does not depend on tcc.
i'm not sure why, but i can think of at least one
good reason. in my local tree I have it modified
to do so, but somehow inadvertently reverted that
so when i did "make test" before committing, it
didn't actually test my changes. sorry.
2011-03-08 14:58:02 -08:00
Joe Soroka
31fe1cc62b
clarify support for functions returning an array
...
previously, tcc would accept a prototype of a function returning
an array, but not giving those functions bodies nor calling them.
it seems that gcc has never supported them, so we should probably
just error out... but it's possible that someone already using
tcc includes some header that contains an unused prototype for
one, so let's continue to support that.
2011-03-08 14:13:08 -08:00
Joe Soroka
5eb82755db
support c99 for-loop init decls (2nd attempt)
2011-03-08 13:36:04 -08:00
Joe Soroka
7fc2eee55c
partially revert e23194a
...
see http://lists.nongnu.org/archive/html/tinycc-devel/2011-03/msg00002.html
2011-03-08 13:22:48 -08:00
Joe Soroka
b3a8eed49e
revert last 3 commits. will find better way.
2011-03-08 12:56:13 -08:00
Joe Soroka
2d292e69a1
small change to previous whitespace-only commit
2011-03-08 09:26:36 -08:00
Joe Soroka
545a37b306
some indentation made prev patch pretty; removed it
2011-03-08 01:59:50 -08:00
Joe Soroka
89059f94c0
refactor post_type() to be explicit about its recursion
2011-03-08 01:47:31 -08:00
Joe Soroka
772b302187
added a note clarifying post_type() recursion
...
some ancient pre-K&R C allows a function to return an array
and the array brackets to be put after the arguments, such
that "int c()[]" means the same as "int[] c()"
see:
http://llvm.org/bugs/show_bug.cgi?id=2399
http://java.sun.com/docs/books/jls/third_edition/html/classes.html#38703
2011-03-08 01:33:17 -08:00
Joe Soroka
585027aa96
tccelf: allow multiply defined weak symbols
2011-03-07 12:18:54 -08:00
Joe Soroka
e23194a1fa
support c99 for-loop init decls
2011-03-07 11:28:31 -08:00
Joe Soroka
4fbe3cda33
use new weaken_symbol() to fix another real-world corner case
2011-03-07 01:05:09 -08:00
Joe Soroka
8bcb2ae1b2
factor out symbol weakening into new function
2011-03-07 01:02:23 -08:00
Joe Soroka
0f0c2d9c02
weak redefinition of a symbol should weaken the original
2011-03-07 00:25:27 -08:00
Joe Soroka
38cbb40e90
__typeof(t) should not include storage modifiers of t
2011-03-06 22:32:35 -08:00
Joe Soroka
c93eca4fe4
tccgen: handle __attribute((alias("target")))
2011-03-03 01:58:45 -08:00
Joe Soroka
ce8c1886a5
collapse branch in decl(), making way for next patch
2011-03-03 01:07:36 -08:00
Joe Soroka
3beb383236
handle post-asm-label attributes on variables
2011-03-03 00:55:02 -08:00
Joe Soroka
823f832630
tcc: fix weak attribute handling
2011-03-02 13:31:09 -08:00
Joe Soroka
1b85b55059
i386-asm: support "pause" opcode
2011-02-24 09:38:13 -08:00
Joe Soroka
bec84fa00a
tccasm: support alternate .type syntaxes
2011-02-24 09:24:02 -08:00
Joe Soroka
15b8a57096
tccpp: treat gas comments in .S files as raw text, not tokens
2011-02-23 15:13:08 -08:00
Joe Soroka
3b4b3b75a6
revert "update VT_STRUCT_SHIFT for new VT_VLA"
2011-02-04 17:54:08 -08:00
Joe Soroka
b0c50fbd4d
update VT_STRUCT_SHIFT for new VT_VLA
2011-02-04 14:33:38 -08:00
Joe Soroka
db6fcce78f
tcc: add sysinclude path with -B, like gcc does
2011-02-02 00:00:12 -08:00
Joe Soroka
e939c4072c
add -isystem cmdline option
2011-02-01 23:32:53 -08:00
Joe Soroka
b88677454b
tcctest: plugged memleak (was polluting valgrind reports)
2011-02-01 16:05:57 -08:00
Joe Soroka
0d9376da70
tccasm: accept bracketed offset expressions
2011-02-01 15:53:48 -08:00
Joe Soroka
47b4cf22cd
tccasm: accept "fmul/fadd st(0),st(n)" (dietlibc ipow/atanh)
2011-02-01 15:49:37 -08:00
Joe Soroka
87d84b7cb8
tccasm: allow one-line prefix+op things like "rep stosb"
2011-02-01 15:37:58 -08:00
Joe Soroka
a25325e9be
tccasm: define __ASSEMBLER__ for .S files, like gcc does
2011-02-01 15:26:21 -08:00
Joe Soroka
75c6695932
tccpp: fix bug in handling of recursive macros
2011-02-01 13:23:40 -08:00
Joe Soroka
cf08675702
weak definitions overrule non-weak prototypes
2011-02-01 09:41:03 -08:00
Joe Soroka
c59d3426b8
tccasm: support .weak labels
2011-02-01 08:43:54 -08:00
Joe Soroka
4d5105c8f1
support weak attribute on variables
2011-02-01 00:37:53 -08:00
Joe Soroka
6839382480
asmtest: avoid testing against complex nop alignment in gas
...
.align #,0x90 in gas ignores the 0x90 and outputs any kind
of nop it feels like. the one avoided by this patch is a 7
byte nop, which gas has been doing since at least 1999:
http://sourceware.org/ml/binutils/1999-10/msg00083.html
In order to match what gas does, we would need to make
code alignment target-specific, import a lot of code, and
face the question: exactly which gas {version,target,tune}
combo are we trying to match? see i386_align_code in:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.c?annotate=1.460&cvsroot=src
The smart noppery is turned on via the special casing of 0x90
at line 438 in md_do_align in:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.h?annotate=1.1&cvsroot=src
2011-01-23 16:46:24 -08:00
Joe Soroka
2047f88334
i386-asm: accept retl as a synonym for ret
2011-01-21 01:35:28 -08:00
Joe Soroka
f43fafc680
accept multiple comma separated symbols for .globl/.global directives, like gas does
2011-01-20 02:00:50 -08:00