From e8fd72d5bb2dd9eefbc17b58a9d3d0443704157f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Apr 2005 22:38:20 +0000 Subject: [PATCH] (symbol_make_alias): Call symbol_type_set, reverting the 2004-10-11 change to this function. (symbol_check_alias_consistency): Don't call symbol_type_set if the type name is already correct. --- src/symtab.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/symtab.c b/src/symtab.c index 63f3bf39..223229fa 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -1,6 +1,6 @@ /* Symbol table manager for Bison. - Copyright (C) 1984, 1989, 2000, 2001, 2002, 2004 Free Software + Copyright (C) 1984, 1989, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -264,6 +264,7 @@ symbol_make_alias (symbol *sym, symbol *symval, location loc) abort (); sym->number = symval->number = (symval->number < sym->number) ? symval->number : sym->number; + symbol_type_set (symval, sym->type_name, loc); } } @@ -283,7 +284,7 @@ symbol_check_alias_consistency (symbol *this) if (!(this->alias && this->user_token_number == USER_NUMBER_ALIAS)) return; - if (orig->type_name || alias->type_name) + if (orig->type_name != alias->type_name) { if (orig->type_name) symbol_type_set (alias, orig->type_name, orig->type_location); -- 2.45.2