Fix nondeterminism discussed in 258b700f59
This commit is contained in:
parent
ac51602455
commit
e8d21388ed
8 changed files with 41 additions and 8 deletions
|
|
@ -3002,7 +3002,7 @@ void TParseContext::structArrayCheck(const TSourceLoc& /*loc*/, const TType& typ
|
|||
}
|
||||
}
|
||||
|
||||
void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qualifier, const TArraySizes* arraySizes, bool initializer, bool lastMember)
|
||||
void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qualifier, TArraySizes* arraySizes, bool initializer, bool lastMember)
|
||||
{
|
||||
assert(arraySizes);
|
||||
|
||||
|
|
@ -3015,8 +3015,10 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
|
|||
return;
|
||||
|
||||
// No environment allows any non-outer-dimension to be implicitly sized
|
||||
if (arraySizes->isInnerImplicit())
|
||||
if (arraySizes->isInnerImplicit()) {
|
||||
error(loc, "only outermost dimension of an array of arrays can be implicitly sized", "[]", "");
|
||||
arraySizes->clearInnerImplicit();
|
||||
}
|
||||
|
||||
if (arraySizes->isInnerSpecialization())
|
||||
error(loc, "only outermost dimension of an array of arrays can be a specialization constant", "[]", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue