aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-exp.y
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2013-10-02 00:46:07 +0000
committerKeith Seitz <keiths@redhat.com>2013-10-02 00:46:07 +0000
commitd7561cbbf27a8ff771f85baf6696aa7645250484 (patch)
treeeb81d452fe456e9a043cc453bf8b65617b40e915 /gdb/f-exp.y
parent62574b938f80a485874b85a770d03bf0f21eece5 (diff)
downloadbinutils-d7561cbbf27a8ff771f85baf6696aa7645250484.zip
binutils-d7561cbbf27a8ff771f85baf6696aa7645250484.tar.gz
binutils-d7561cbbf27a8ff771f85baf6696aa7645250484.tar.bz2
Constification of parse_linespec and fallout:
https://sourceware.org/ml/gdb-patches/2013-09/msg01017.html https://sourceware.org/ml/gdb-patches/2013-09/msg01018.html https://sourceware.org/ml/gdb-patches/2013-09/msg01019.html https://sourceware.org/ml/gdb-patches/2013-09/msg01020.html
Diffstat (limited to 'gdb/f-exp.y')
-rw-r--r--gdb/f-exp.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 296a7fe..59c5e6c 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -157,7 +157,7 @@ static int match_string_literal (void);
%{
/* YYSTYPE gets defined by %union */
-static int parse_number (char *, int, int, YYSTYPE *);
+static int parse_number (const char *, int, int, YYSTYPE *);
%}
%type <voidval> exp type_exp start variable
@@ -669,7 +669,7 @@ name_not_typename : NAME
/*** Needs some error checking for the float case ***/
static int
-parse_number (char *p, int len, int parsed_float, YYSTYPE *putithere)
+parse_number (const char *p, int len, int parsed_float, YYSTYPE *putithere)
{
LONGEST n = 0;
LONGEST prevn = 0;
@@ -920,7 +920,7 @@ growbuf_by_size (int count)
static int
match_string_literal (void)
{
- char *tokptr = lexptr;
+ const char *tokptr = lexptr;
for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
{
@@ -955,7 +955,7 @@ yylex (void)
int c;
int namelen;
unsigned int i,token;
- char *tokstart;
+ const char *tokstart;
retry:
@@ -1054,7 +1054,7 @@ yylex (void)
{
/* It's a number. */
int got_dot = 0, got_e = 0, got_d = 0, toktype;
- char *p = tokstart;
+ const char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))