From 38cbb40e904f3113ae117278fbbcda0f71f18c92 Mon Sep 17 00:00:00 2001 From: Joe Soroka Date: Sun, 6 Mar 2011 22:32:35 -0800 Subject: __typeof(t) should not include storage modifiers of t --- tccgen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tccgen.c') 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) -- cgit v1.3.1