I have something which "apears" to work. I have no idea if its the proper
approach.
Finding where the problem was was actually quite easy. Basically
/* functions names must be treated as function pointers,
except for unary '&' and sizeof. Since we consider that
functions are not lvalues, we only have to handle it
there and in function calls. */
/* arrays can also be used although they are not lvalues */
if ((vtop->type.t & VT_BTYPE) != VT_FUNC &&
!(vtop->type.t & VT_ARRAY))
test_lvalue();
Which fails and aborts....
I did a bit of searching, and changed that too
if ((vtop->type.t & VT_BTYPE) != VT_FUNC &&
!(vtop->type.t & VT_ARRAY) &&
!(vtop->type.t & VT_LLOCAL))
It apears to work. so far nothing broken. But I am by no means an expert.
Andrew
-----Original Message-----
>From: Andrew Johnson <[EMAIL PROTECTED]>
>Sent: Sep 26, 2006 12:48 PM
>To: [email protected]
>Subject: Re: [Tinycc-devel] Compound Literals
>
>Ah. Yes. You are correct. I did check, and inside functions, its working fine.
>So this is effectively a bug with compound literals, but only in the global
>scope....
>
>Which is naturally where I use them the most, of course. ;)
>
>I will look at tcc code. It's probably beyond my ability to fix. But never
>hurts to try.
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel