tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Compound Literals


From: Rob Landley
Subject: Re: [Tinycc-devel] Compound Literals
Date: Wed, 22 Aug 2007 16:32:43 -0500
User-agent: KMail/1.9.6

On Tuesday 26 September 2006 3:14:58 pm Andrew Johnson wrote:
> 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

Oh wow this is an old message.  However, I just verified that the patch in it 
works for me, and I applied it.

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.




reply via email to

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