summaryrefslogtreecommitdiff
path: root/src/symtab.c
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-03-08 09:52:13 +0100
committerAkim Demaille <akim.demaille@gmail.com>2020-03-08 10:13:16 +0100
commit951da960e6f890166d5f0cfd0614a54351b35086 (patch)
tree3fdabfd8b53d6cdd8985ca4ec233fa860a41383a /src/symtab.c
parentecd922024ed22d6bc0383cdadee7a3298761759d (diff)
parent15ea35019fb366ca667ccb785ab138dd7a1aeda0 (diff)
downloadbison-951da960e6f890166d5f0cfd0614a54351b35086.tar.gz
merge branch 'maint'
* upstream/maint: maint: post-release administrivia version 3.5.3 news: update for 3.5.3 yacc.c: make sure we properly propagated the user's number for error diagnostics: don't crash because of repeated definitions of error style: initialize some struct members diagnostics: beware of zero-width characters diagnostics: be sure to close the styling when lines are too short muscles: fix incorrect decoding of $ code: be robust to reference with invalid tags build: fix typo doc: update recommandation for libtextstyle style: comment changes examples: use consistently the GFDL header for readmes style: remove useless declarations typo: succesful -> successful README: point to tests/bison, and document --trace gnulib: update maint: post-release administrivia
Diffstat (limited to 'src/symtab.c')
-rw-r--r--src/symtab.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/symtab.c b/src/symtab.c
index b6f0a952..a446476c 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -77,10 +77,12 @@ sym_content_new (symbol *s)
res->symbol = s;
res->type_name = NULL;
+ res->type_loc = empty_loc;
for (int i = 0; i < CODE_PROPS_SIZE; ++i)
code_props_none_init (&res->props[i]);
res->number = NUMBER_UNDEFINED;
+ res->prec_loc = empty_loc;
res->prec = 0;
res->assoc = undef_assoc;
res->user_token_number = USER_NUMBER_UNDEFINED;
@@ -539,7 +541,10 @@ symbol_class_set (symbol *sym, symbol_class class, location loc, bool declaring)
_("previous declaration"));
}
else
- s->status = declared;
+ {
+ sym->location = loc;
+ s->status = declared;
+ }
}
}
}