From 48aeb18bc128123e52b63b85a35615f81e68583b Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 22 Apr 2010 16:18:58 +0000 Subject: [PATCH] Fix C/gnu99/typeof.c: revert_automatic_type_conversion() was missing in the default case. Remember kids: Code duplication is bad. [r27427] --- parser.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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; -- 2.20.1