Commit e7f9452d authored by Russ Cox's avatar Russ Cox

missing error checking related to ([...]int){...}

R=ken
OCL=35132
CL=35132
parent 08eefec9
......@@ -323,7 +323,7 @@ variter(NodeList *vl, Node *t, NodeList *el)
declare(v, dclcontext);
v->ntype = t;
if(e != N || funcdepth > 0) {
if(e != N || funcdepth > 0 || isblank(v)) {
if(funcdepth > 0)
init = list(init, nod(ODCL, v, N));
e = nod(OAS, v, e);
......
......@@ -1010,6 +1010,11 @@ ret:
case TNIL:
case TBLANK:
break;
case TARRAY:
if(t->bound == -100) {
yyerror("use of [...] array outside of array literal");
t->bound = 1;
}
default:
checkwidth(t);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment