aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-07-01 11:40:37 -0600
committerTom Tromey <tromey@adacore.com>2021-08-02 10:11:23 -0600
commit17a3da839932b79dcccfdf41867965892b756540 (patch)
tree8743230e79ea710da2c3c2ad59cc53b55448dcb1
parent03adb248d621063cbbb0ce583cbd2e016ada7a6f (diff)
downloadgdb-17a3da839932b79dcccfdf41867965892b756540.zip
gdb-17a3da839932b79dcccfdf41867965892b756540.tar.gz
gdb-17a3da839932b79dcccfdf41867965892b756540.tar.bz2
Remove the type_qualifier global
The type_qualifier global is no longer needed in the Ada expression parser, so this removes it.
-rw-r--r--gdb/ada-exp.y14
1 files changed, 1 insertions, 13 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index a0b8b7d..66d58b0 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -68,10 +68,6 @@ struct name_info {
static struct parser_state *pstate = NULL;
-/* If expression is in the context of TYPE'(...), then TYPE, else
- * NULL. */
-static struct type *type_qualifier;
-
int yyparse (void);
static int yylex (void);
@@ -428,8 +424,6 @@ pop_associations (int n)
%type <bval> block
%type <lval> arglist tick_arglist
-%type <tval> save_qualifier
-
%token DOT_ALL
/* Special type cases, put in to allow the parser to distinguish different
@@ -516,8 +510,7 @@ primary : primary '(' arglist ')'
}
;
-primary : var_or_type '\'' save_qualifier { type_qualifier = $1; }
- '(' exp ')'
+primary : var_or_type '\'' '(' exp ')'
{
if ($1 == NULL)
error (_("Type required for qualification"));
@@ -525,13 +518,9 @@ primary : var_or_type '\'' save_qualifier { type_qualifier = $1; }
check_typedef ($1));
pstate->push_new<ada_qual_operation>
(std::move (arg), $1);
- type_qualifier = $3;
}
;
-save_qualifier : { $$ = type_qualifier; }
- ;
-
primary :
primary '(' simple_exp DOTDOT simple_exp ')'
{ ada_wrap3<ada_ternop_slice_operation> (); }
@@ -1093,7 +1082,6 @@ ada_parse (struct parser_state *par_state)
pstate = par_state;
lexer_init (yyin); /* (Re-)initialize lexer. */
- type_qualifier = NULL;
obstack_free (&temp_parse_space, NULL);
obstack_init (&temp_parse_space);
components.clear ();