[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Compound Literals

From: Andrew Johnson
Subject: Re: [Tinycc-devel] Compound Literals
Date: Tue, 26 Sep 2006 16:14:58 -0400 (EDT)

I have something which "apears" to work. I have no idea if its the proper 
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))

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.


-----Original Message-----
>From: Andrew Johnson <address@hidden>
>Sent: Sep 26, 2006 12:48 PM
>To: address@hidden
>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 
>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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]