Make two cp-name-parser.y constants "const"
This changes "backslashable" and "represented" in cp-name-parser.y to be const. This lets the compiler make them read-only (though in my build it seems that GCC inlines them, which seems even better). gdb/ChangeLog 2018-06-01 Tom Tromey <tom@tromey.com> * cp-name-parser.y (backslashable, represented): Now const.
This commit is contained in:
parent
98e69eb381
commit
7b640f7268
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2018-06-01 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* cp-name-parser.y (backslashable, represented): Now const.
|
||||
|
||||
2018-06-01 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* cp-name-parser.y: Include parser-defs.h.
|
||||
|
|
|
@ -1396,8 +1396,8 @@ parse_number (cpname_state *state, const char *p, int len, int parsed_float,
|
|||
return INT;
|
||||
}
|
||||
|
||||
static char backslashable[] = "abefnrtv";
|
||||
static char represented[] = "\a\b\e\f\n\r\t\v";
|
||||
static const char backslashable[] = "abefnrtv";
|
||||
static const char represented[] = "\a\b\e\f\n\r\t\v";
|
||||
|
||||
/* Translate the backslash the way we would in the host character set. */
|
||||
static int
|
||||
|
|
Loading…
Add table
Reference in a new issue