harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 923386d12a84d40e162284def0f38b062fea97e7
parent c6fce7c3d077f81d94c272f633bb16c74a6eb963
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 21 May 2021 14:39:59 -0400

Allow any pointer type to promote to *void

Diffstat:
Msrc/check.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/check.c b/src/check.c @@ -607,8 +607,12 @@ type_promote(struct type_store *store, if (db->storage != STORAGE_POINTER) { return NULL; } - const struct type *r = type_promote(store, da->pointer.referent, - db->pointer.referent); + if (da->pointer.referent->storage == STORAGE_VOID || + db->pointer.referent->storage == STORAGE_VOID) { + return a; + } + const struct type *r = type_promote(store, + da->pointer.referent, db->pointer.referent); if (r == da->pointer.referent) { return a; }