mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
symbol: don't crash on symbol without content
When running with --trace=parse, we may crash. * src/symtab.c (symbol_print): Avoid that.
This commit is contained in:
@@ -210,11 +210,11 @@ semantic_type_new (uniqstr tag, const location *loc)
|
||||
`-----------------*/
|
||||
|
||||
#define SYMBOL_ATTR_PRINT(Attr) \
|
||||
if (s->content->Attr) \
|
||||
if (s->content && s->content->Attr) \
|
||||
fprintf (f, " %s { %s }", #Attr, s->content->Attr)
|
||||
|
||||
#define SYMBOL_CODE_PRINT(Attr) \
|
||||
if (s->content->props[Attr].code) \
|
||||
if (s->content && s->content->props[Attr].code) \
|
||||
fprintf (f, " %s { %s }", #Attr, s->content->props[Attr].code)
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user