mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
Remove dead code.
* src/symtab.c (symbol_pack): Here because every symbol's number
is always defined by this time.
(cherry picked from commit f74d6d2591)
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-10-03 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
|
Remove dead code.
|
||||||
|
* src/symtab.c (symbol_pack): Here because every symbol's number
|
||||||
|
is always defined by this time.
|
||||||
|
|
||||||
2009-10-03 Alex Rozenman <rozenman@gmail.com>
|
2009-10-03 Alex Rozenman <rozenman@gmail.com>
|
||||||
|
|
||||||
Add additional space after periods in NEWS.
|
Add additional space after periods in NEWS.
|
||||||
|
|||||||
28
src/symtab.c
28
src/symtab.c
@@ -514,31 +514,11 @@ symbol_check_alias_consistency_processor (void *this,
|
|||||||
static inline bool
|
static inline bool
|
||||||
symbol_pack (symbol *this)
|
symbol_pack (symbol *this)
|
||||||
{
|
{
|
||||||
|
aver (this->number != NUMBER_UNDEFINED);
|
||||||
if (this->class == nterm_sym)
|
if (this->class == nterm_sym)
|
||||||
{
|
this->number += ntokens;
|
||||||
this->number += ntokens;
|
else if (this->user_token_number == USER_NUMBER_HAS_STRING_ALIAS)
|
||||||
}
|
return true;
|
||||||
else if (this->alias)
|
|
||||||
{
|
|
||||||
/* This symbol and its alias are a single token defn.
|
|
||||||
Allocate a tokno, and assign to both check agreement of
|
|
||||||
prec and assoc fields and make both the same */
|
|
||||||
if (this->number == NUMBER_UNDEFINED)
|
|
||||||
{
|
|
||||||
if (this == endtoken || this->alias == endtoken)
|
|
||||||
this->number = this->alias->number = 0;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aver (this->alias->number != NUMBER_UNDEFINED);
|
|
||||||
this->number = this->alias->number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Do not do processing below for USER_NUMBER_HAS_STRING_ALIASes. */
|
|
||||||
if (this->user_token_number == USER_NUMBER_HAS_STRING_ALIAS)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else /* this->class == token_sym */
|
|
||||||
aver (this->number != NUMBER_UNDEFINED);
|
|
||||||
|
|
||||||
symbols[this->number] = this;
|
symbols[this->number] = this;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user