1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-12 02:30:44 +00:00

Recursively checking for incomplete/unknown-sized types.

This commit is contained in:
acqn 2020-08-30 02:30:43 +08:00 committed by Oliver Schmidt
parent 8541f18340
commit f1161daee9

View File

@ -979,7 +979,7 @@ int IsClassIncomplete (const Type* T)
/* Return true if this is an object type lacking size info */
{
if (IsTypeArray (T)) {
return GetElementCount (T) == UNSPECIFIED;
return GetElementCount (T) == UNSPECIFIED || IsClassIncomplete (T + 1);
}
return IsTypeVoid (T) || IsIncompleteESUType (T);
}
@ -1072,7 +1072,7 @@ int HasUnknownSize (const Type* T)
/* Return true if this is an incomplete ESU type or an array of unknown size */
{
if (IsTypeArray (T)) {
return GetElementCount (T) == UNSPECIFIED;
return GetElementCount (T) == UNSPECIFIED || HasUnknownSize (T + 1);
}
return IsIncompleteESUType (T);
}