|
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 13:01:54 +0300 |
> > + 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; > Why not to use "vtop->c.ll = 0;" insteed of "memset(&vtop->c, 0, > sizeof(vtop->c));" ? > Because I like to write correct C. On which archs "sizeof(long long) < sizeof(int)" ?
[Prev in Thread] | Current Thread | [Next in Thread] |