]> git.saurik.com Git - bison.git/commit - src/symtab.h
warnings: useless semantic types
authorVictor Santet <victor.santet@epita.fr>
Mon, 18 Jun 2012 13:44:38 +0000 (15:44 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 25 Jun 2012 09:29:14 +0000 (11:29 +0200)
commit9641b918bae9eb8d0bb9099ab6d9d46383ba8bc9
tree4ee3a0879cea8f81c0f52cf3a199fd06d30ac638
parent423ca9b50e4321c078cc6fe7903b10ed4907d269
warnings: useless semantic types

* src/symtab.h (symbol_list): Represent semantic types as structure
'semantic_type'.
* src/symlist.c (symbol_list_type_new): Allocate this structure.
(symbol_list_code_props_set): Set this semantic type's status to used if it
was not declared.
* src/symtab.c (semantic_types_sorted): New.
(semantic_type_new): Set the new semantic type's location appropriately.
(symbol_check_defined): If a symbol has a type, then set this type's status
to "declared".
(semantic_type_check_defined, semantic_type_check_defined_processor): Same
as symbol_check_defined and symbol_check_defined_processor, but for semantic
types.
(symbol_check_defined): Check semantic types usefulness.
* src/symtab.h (semantic_type): New fields 'location' and 'status'.
* src/symtab.h, src/symtab.c (semantic_type_new)
(semantic_type_from_uniqstr, semantic_type_get): Accept a location as a
supplementary argument.
* tests/input.at (Unassociated types used for printer of destructor): New.
* tests/c++.at (AT_CHECK_VARIANTS): Fix an error caught by this commit.
NEWS
src/symlist.c
src/symlist.h
src/symtab.c
src/symtab.h
tests/c++.at
tests/input.at