[hackers] [scc] Initialize all the flags of new created types || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 11 Jan 2016 10:17:13 +0100 (CET)

commit 01d01a1a25cb16603479e6e0a7ae3dbc7c726686
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jan 10 11:30:33 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jan 10 11:30:33 2016 +0100

    Initialize all the flags of new created types
    
    This change simplify the logic in mktype()

diff --git a/cc1/types.c b/cc1/types.c
index 0a23b9c..1607bd4 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -452,7 +452,9 @@ mktype(Type *tp, int op, TINT nelem, Type *pars[])
 
         type.type = tp;
         type.op = op;
+ type.defined = 0;
         type.arith = 0;
+ type.sign = 0;
         type.integer = 0;
         type.printed = 0;
         type.aggreg = 0;
_AT_@ -465,7 +467,7 @@ mktype(Type *tp, int op, TINT nelem, Type *pars[])
         switch (op) {
         case ARY:
                 if (nelem == 0)
- goto no_defined;
+ break;
                 /* PASSTROUGH */
         case FTN:
         case PTR:
_AT_@ -475,14 +477,11 @@ mktype(Type *tp, int op, TINT nelem, Type *pars[])
                 type.printed = 1;
                 type.integer = 1;
                 type.arith = 1;
- type.sign = 0;
                 type.n.rank = RANK_INT;
- goto no_defined;
+ break;
         case STRUCT:
         case UNION:
                 type.aggreg = 1;
- no_defined:
- type.defined = 0;
                 break;
         }
 
Received on Mon Jan 11 2016 - 10:17:13 CET

This archive was generated by hypermail 2.3.0 : Mon Jan 11 2016 - 10:24:15 CET