From 421796b9ea211f83534a7b20aeef5429999fdc30 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 9 Oct 2024 11:31:00 +0900 Subject: [PATCH] [qfcc] Unalias type before checking for pointer/reference Before adding references, looking at just type.type was ok whether or not the type was an alias, but checking the deref flag needs the type to be basic and not alias. --- tools/qfcc/source/type.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index a0c550c3c..e7fe935d4 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -1293,12 +1293,14 @@ int is_##t (const type_t *type) \ int is_pointer (const type_t *type) { + type = unalias_type (type); return is_ptr (type) && !type->fldptr.deref; } int is_reference (const type_t *type) { + type = unalias_type (type); return is_ptr (type) && type->fldptr.deref; }