improved error output for arrays using decl

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4032
This commit is contained in:
Borja Ferrer 2006-07-15 19:23:07 +00:00
parent d0e9590bbd
commit b712d61b47

View File

@ -2339,8 +2339,11 @@ static cell initvector(int ident,int tag,cell size,int fillzero,
} while (matchtoken(',')); /* do */
needtoken('}');
} else {
if (hadtoken && !autozero)
if (hadtoken && !autozero) {
error(10);
lexclr(TRUE); /* drop the rest of the line */
return 0;
}
init(ident,&ctag,errorfound);
if (!matchtag(tag,ctag,TRUE))
error(213); /* tagname mismatch */