if (expr->getQualifier() != EvqConstExpr || constant == 0 || !constant->isScalarInt())
{
error(line, "array size must be a constant integer expression", "");
+ size = 1;
return true;
}
TType arrayType(publicType);
- int size;
+ int size = 0;
if(arraySizeErrorCheck(identifierLocation, indexExpression, size))
{
recover();
else
{
TType arrayType = TType(publicType);
- int size;
+ int size = 0;
if(arraySizeErrorCheck(arrayLocation, indexExpression, size))
{
recover();
if (context->reservedErrorCheck(@2, *$2.string))
context->recover();
- int size;
+ int size = 0;
if (context->arraySizeErrorCheck(@3, $4, size))
context->recover();
$1.setArray(true, size);
if (context->arrayTypeErrorCheck(@2, $1))
context->recover();
else {
- int size;
+ int size = 0;
if (context->arraySizeErrorCheck(@2, $3, size))
context->recover();
$$.setArray(true, size);
context->recover();
TType* type = new TType(EbtVoid, EbpUndefined);
- int size;
+ int size = 0;
if (context->arraySizeErrorCheck($3->getLine(), $3, size))
context->recover();
type->setArraySize(size);
if (context->reservedErrorCheck((yylsp[-3]), *(yyvsp[-3].lex).string))
context->recover();
- int size;
+ int size = 0;
if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
context->recover();
(yyvsp[-4].interm.type).setArray(true, size);
if (context->arrayTypeErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
context->recover();
else {
- int size;
+ int size = 0;
if (context->arraySizeErrorCheck((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode), size))
context->recover();
(yyval.interm.type).setArray(true, size);
context->recover();
TType* type = new TType(EbtVoid, EbpUndefined);
- int size;
+ int size = 0;
if (context->arraySizeErrorCheck((yyvsp[-1].interm.intermTypedNode)->getLine(), (yyvsp[-1].interm.intermTypedNode), size))
context->recover();
type->setArraySize(size);