mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
allow modification on retrieved code_props.
The logic to compute the %printer or %destructor to used (i.e., a code_props) is implemented twice: one, of course, in symbol_code_props_get, and another time in symbol_check_defined to record the fact that a code_props is used (so that we can reported unused ones). Let the former use the latter. I would probably use "mutable" in C++ and keep these guys const, but this is C. And casting away constness triggers warnings. * src/scan-code.h, src/scan-code.l (code_props_none): Is not const. * src/symtab.h, src/symtab.c (symbol_code_props_get): The symbol is not const. (symbol_check_defined): Use it.
This commit is contained in:
@@ -890,7 +890,7 @@ code_props_none_init (code_props *self)
|
||||
*self = code_props_none;
|
||||
}
|
||||
|
||||
code_props const code_props_none = CODE_PROPS_NONE_INIT;
|
||||
code_props code_props_none = CODE_PROPS_NONE_INIT;
|
||||
|
||||
void
|
||||
code_props_plain_init (code_props *self, char const *code,
|
||||
|
||||
Reference in New Issue
Block a user