[qfcc] Make array_type const-correct

As such... need to cast away the const when calling append_type (which
should probably become internal).
This commit is contained in:
Bill Currie 2024-02-13 20:01:09 +09:00
parent 32a8287fc1
commit 827ca3cf27
2 changed files with 3 additions and 3 deletions

View file

@ -199,7 +199,7 @@ type_t *uint_type (const type_t *base) __attribute__((pure));
*/
type_t *float_type (const type_t *base) __attribute__((pure));
type_t *array_type (type_t *aux, int size);
type_t *array_type (const type_t *aux, int size);
type_t *based_array_type (type_t *aux, int base, int top);
type_t *alias_type (type_t *type, type_t *alias_chain, const char *name);
const type_t *unalias_type (const type_t *type) __attribute__((pure));

View file

@ -746,7 +746,7 @@ float_type (const type_t *base)
}
type_t *
array_type (type_t *aux, int size)
array_type (const type_t *aux, int size)
{
type_t _new;
type_t *new = &_new;
@ -763,7 +763,7 @@ array_type (type_t *aux, int size)
}
new->t.array.size = size;
if (aux) {
new = find_type (append_type (new, aux));
new = find_type (append_type (new, (type_t *) aux));
}
return new;
}