shithub: mc

Download patch

ref: a114d48439dacfab6e3006c77a17f88e6295104e
parent: fbf50215af6de28f1c0ef86acbcba4666d771967
author: Ori Bernstein <[email protected]>
date: Thu Jun 28 07:55:06 EDT 2012

Generate code for creating unions.

--- a/8/reduce.c
+++ b/8/reduce.c
@@ -249,6 +249,7 @@
             sz = Wordsz;
             for (i = 0; i < t->nmemb; i++)
                 sz = max(sz, tysize(t->udecls[i]->etype) + Wordsz);
+            return sz;
             break;
         case Tybad: case Tyvar: case Typaram: case Tyname: case Ntypes:
             die("Type %s does not have size; why did it get down to here?", tystr(t));
@@ -610,6 +611,7 @@
     } else {
         r = store(u, elt);
     }
+    append(s, r);
     return tmp;
 }