From: Christoph Mallon Date: Thu, 22 Apr 2010 16:18:58 +0000 (+0000) Subject: Fix C/gnu99/typeof.c: revert_automatic_type_conversion() was missing in the default... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=48aeb18bc128123e52b63b85a35615f81e68583b;p=cparser Fix C/gnu99/typeof.c: revert_automatic_type_conversion() was missing in the default case. Remember kids: Code duplication is bad. [r27427] --- diff --git a/parser.c b/parser.c index 826ddd9..19814b9 100644 --- a/parser.c +++ b/parser.c @@ -2636,6 +2636,7 @@ static type_t *parse_typeof(void) if (is_typedef_symbol(token.symbol)) { type = parse_typename(); } else { + default: expression = parse_expression(); type = revert_automatic_type_conversion(expression); } @@ -2644,11 +2645,6 @@ static type_t *parse_typeof(void) TYPENAME_START type = parse_typename(); break; - - default: - expression = parse_expression(); - type = expression->base.type; - break; } in_type_prop = old_type_prop; in_gcc_extension = old_gcc_extension;