From: Theophile Ranquet Date: Tue, 11 Dec 2012 12:23:44 +0000 (+0100) Subject: symtab: add missing initializations X-Git-Tag: v2.7.90~258 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/e96b1b2c452d62d0fe9cef4338c882db0b7d0691 symtab: add missing initializations * src/symtab.c (semantic_type_new): Here. --- diff --git a/src/symtab.c b/src/symtab.c index 54155e19..c8490ac6 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -111,8 +111,8 @@ semantic_type_new (uniqstr tag, const location *loc) uniqstr_assert (tag); res->tag = tag; - if (loc) - res->location = *loc; + res->location = loc ? *loc : empty_location; + res->status = undeclared; for (int i = 0; i < CODE_PROPS_SIZE; ++i) code_props_none_init (&res->props[i]);