__typeof(t) should not include storage modifiers of t

This commit is contained in:
Joe Soroka
2011-03-06 22:32:35 -08:00
parent 5d55647a3c
commit 38cbb40e90
2 changed files with 7 additions and 0 deletions

View File

@ -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)