[qfcc] Support arrays in dereference_type

This is needed to get the correct type from arrays of typedefed
elements.
This commit is contained in:
Bill Currie 2024-02-13 20:02:34 +09:00
parent 827ca3cf27
commit fa5c3ab12e

View file

@ -834,8 +834,8 @@ unalias_type (const type_t *type)
const type_t *
dereference_type (const type_t *type)
{
if (!is_ptr (type) && !is_field (type)) {
internal_error (0, "dereference non pointer/field type");
if (!is_ptr (type) && !is_field (type) && !is_array (type)) {
internal_error (0, "dereference non pointer/field/array type");
}
if (type->meta == ty_alias) {
type = type->t.alias.full_type;