diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-30 08:19:01 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-06-01 10:46:49 -0600 |
commit | 7b640f726819bedab1515ce49f03c0de26193b3b (patch) | |
tree | aeab534ff133e15b58fe56231129533274c90dc9 /gdb/cp-name-parser.y | |
parent | 98e69eb381347eb06dfedaa0b185ad26818ce5cd (diff) | |
download | binutils-7b640f726819bedab1515ce49f03c0de26193b3b.zip binutils-7b640f726819bedab1515ce49f03c0de26193b3b.tar.gz binutils-7b640f726819bedab1515ce49f03c0de26193b3b.tar.bz2 |
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.
Diffstat (limited to 'gdb/cp-name-parser.y')
-rw-r--r-- | gdb/cp-name-parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index 169a92d..b8a3faa 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -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 |