fix to previous patch. detect non-constant initializers even if constant reduction is not done Reference: /n/atom/patch/applied/dcl2 Date: Thu Apr 23 15:19:39 CES 2015 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/cc/dcl.c Thu Apr 23 15:18:59 2015 +++ /sys/src/cmd/cc/dcl.c Thu Apr 23 15:19:01 2015 @@ -381,11 +381,12 @@ diag(a, "initialization of incompatible pointers: %s\n%T and %T", s->name, t, a->type); } - if(a->op == OADDR) { + switch(a->op){ + case OADDR: a = a->left; - goto gext; - } - if(a->type->etype == TIND) { + break; + case ONAME: + case OIND: diag(a, "initializer is not a constant: %s", s->name); return Z; }