From 6052aa89c890aeab4661aca43bd2e088c1be03f3 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Tue, 4 Nov 2008 15:00:36 +0000 Subject: [PATCH] When creating an error typedef, set its type to the error type, so nobody encounters a null pointer later on. [r23434] --- parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parser.c b/parser.c index c1709fc..68b997c 100644 --- a/parser.c +++ b/parser.c @@ -3444,6 +3444,8 @@ static entity_t *create_error_entity(symbol_t *symbol, entity_kind_tag_t kind) if (is_declaration(entity)) { entity->declaration.type = type_error_type; entity->declaration.implicit = true; + } else if (kind == ENTITY_TYPEDEF) { + entity->typedefe.type = type_error_type; } record_entity(entity, false); return entity; -- 2.20.1