[Tinycc-devel] latest mob broken on typedefs

2011-02-07 Thread Aharon Robbins
Hi All. I just checked out the latest mob and tried to compile gawk. It fails. Here is a reduced test case: $ cat testit.c typedef struct { int member1; } moo; static int foo() { static moo boo; return 1; } $ tcc testit.c testit.c:8: error: Function without file scope

[Tinycc-devel] Complain about static fct declared w/o file scope v2

2011-02-07 Thread Thomas Preud'homme
Hello all, I noticed that grishka reverted the previous commit to complain about static function declared without file scope and for good reasons. In post_type the real type might be incomplete because recursion is used in type_decl so I moved the test in decl. I also checked the type better (I

[Tinycc-devel] Get a token from char *

2011-02-07 Thread Thomas Preud'homme
Hello all, Is there a function to get the token from a supplied string, something whose prototype would be: int get_tok_from_str(char *str)? I made an improvement of my commit about assembly function label (commit 9b09fc3) but when I wanted to push it a conflict made me realize another attempt

Re: [Tinycc-devel] can't build mob branch on x86 64

2011-02-07 Thread Daniel Glöckner
On Mon, Feb 07, 2011 at 10:03:44PM +0100, Thomas Preud'homme wrote: > Le lundi 07 février 2011 20:23:44, grischka a écrit : > > In the spirit of tinyness I'd strongly suggest to cultivate the positive > > power of strategical assumptions and to assume simply that tcc already > > does support alloca

Re: [Tinycc-devel] next problem mob branch x86 64

2011-02-07 Thread Thomas Preud'homme
Le vendredi 04 février 2011 10:10:45, Aharon Robbins a écrit : > So, I moved the TOK_alloc definition outside of the ifdefs in tcctok.h > and tcc compiled. Now I get this attempting to build gawk: > > /home/arnold/Gnu/gawk/gawk.git/tcc -g -o gawk array.o awkgram.o > builtin.o dfa.o ext.o field.

Re: [Tinycc-devel] can't build mob branch on x86 64

2011-02-07 Thread grischka
In the spirit of tinyness I'd strongly suggest to cultivate the positive power of strategical assumptions and to assume simply that tcc already does support alloca everywhere. --- grischka And what is the solution for architectures which don't support alloca *yet*. This _IS_ the solution for a

Re: [Tinycc-devel] latest mob broken on typedefs

2011-02-07 Thread Thomas Preud'homme
Le lundi 07 février 2011 22:04:48, Aharon Robbins a écrit : > Hi All. > > I just checked out the latest mob and tried to compile gawk. It fails. > Here is a reduced test case: > > $ cat testit.c > > typedef struct { > int member1; > } moo; > > static int foo() > { > static moo boo;

Re: [Tinycc-devel] latest mob broken on typedefs

2011-02-07 Thread Thomas Preud'homme
Le lundi 07 février 2011 22:04:48, Aharon Robbins a écrit : > Hi All. > > I just checked out the latest mob and tried to compile gawk. It fails. > Here is a reduced test case: > > $ cat testit.c > > typedef struct { > int member1; > } moo; > > static int foo() > { > static moo boo;

[Tinycc-devel] Complain for static fct ...

2011-02-07 Thread grischka
http://repo.or.cz/w/tinycc.git/commitdiff/cf36410e Note that the base types are not bitflags. The patch as is produces false positives for e.g. { static struct {} xxx; ... } Also there is already an if-branch for functions just one line below. For efficiency and anyway natural reasons the check

Re: [Tinycc-devel] can't build mob branch on x86 64

2011-02-07 Thread grischka
Thomas Preud'homme wrote: I will try to provide as soon as possible a version which handle bound check and don't use VLA if they aren't available (should be straightforward with a CONFIG_TCC_ALLOCA defined or not in Makefile). In the spirit of tinyness I'd strongly suggest to cultivate the po

Re: [Tinycc-devel] can't build mob branch on x86 64

2011-02-07 Thread Thomas Preud'homme
Le lundi 07 février 2011 20:23:44, grischka a écrit : > Thomas Preud'homme wrote: > > I will try to provide as soon as possible a version which handle bound > > check and don't use VLA if they aren't available (should be > > straightforward with a CONFIG_TCC_ALLOCA defined or not in Makefile). > >