From 07c4d28638ebb93e5601c1513ed1b6f6a731bcc7 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 19 Jan 2022 21:21:27 +0900 Subject: [PATCH] [qfcc] Handle bare "short" Missed this case in duplicate_type. Allows "short foo" and "sizeof(short)" (even though qfcc and the engine have two ideas of the size: I expect trouble later). --- tools/qfcc/source/qc-parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index b087c69df..cecf04866 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -327,7 +327,7 @@ default_type (specifier_t spec, symbol_t *sym) } else { if (spec.is_unsigned) { spec.type = &type_uint; - } else if (spec.is_signed) { + } else if (spec.is_signed || spec.is_short) { spec.type = &type_int; } }