aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index da970fd..da39d36 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -2948,6 +2948,8 @@ static int parse_btype(CType *type, AttributeDef *ad)
case TOK_TYPEOF3:
next();
parse_expr_type(&type1);
+ /* remove all storage modifiers except typedef */
+ type1.t &= ~(VT_STORAGE&~VT_TYPEDEF);
goto basic_type2;
default:
if (typespec_found || typedef_found)