tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] [PATCH] tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*


From: Sergey Korshunoff
Subject: Re: [Tinycc-devel] [PATCH] tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*0, x|-1, x%1.
Date: Fri, 6 Mar 2015 12:32:43 +0300

2015-03-06 10:43 GMT+03:00, Edmund Grimley Evans
<address@hidden>:
> Sergey Korshunoff <address@hidden>:
>
>> > +            if (l2 == 1)
>> > +                memset(&vtop->c, 0, sizeof(vtop->c));
>>
>> What this means?
>
> It's a valid alternative to writing something like:
>
>     if (t1 == VT_LLONG)
>         vtop->c.ll = 0;
>     else if (vtop->type.t & VT_UNSIGNED)
>         vtop->c.ui = 0;
>     else
>         vtop->c.i = 0;
>
> Which is probably still not really correct because there are another
> couple of integer union members. See my message with the title
> "CValue"!

Why not to use  "vtop->c.ll = 0;" insteed of  "memset(&vtop->c, 0,
sizeof(vtop->c));" ?



reply via email to

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