mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23: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:
@@ -103,7 +103,7 @@ void code_props_none_init (code_props *self);
|
||||
}
|
||||
|
||||
/** Initialized by \c CODE_PROPS_NONE_INIT with no further modification. */
|
||||
extern code_props const code_props_none;
|
||||
extern code_props code_props_none;
|
||||
|
||||
/**
|
||||
* \pre
|
||||
|
||||
Reference in New Issue
Block a user