aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-06 09:49:11 -0700
committerSimon Marchi <simon.marchi@ericsson.com>2019-01-08 12:45:19 -0500
commitcfeadda545c4961877969e6a66be79278696e012 (patch)
treea23a098d0b9aa48402b56d60ea2805523f85920b /gdb/ada-exp.y
parent236f4ebe3ac7e8f94184fdcc39c70d74cc62b82a (diff)
downloadgdb-cfeadda545c4961877969e6a66be79278696e012.zip
gdb-cfeadda545c4961877969e6a66be79278696e012.tar.gz
gdb-cfeadda545c4961877969e6a66be79278696e012.tar.bz2
Fix build failure with macOS bison
PR gdb/24060 points out a compilation failure of the C, Fortran and Pascal parsers when they are built using the macOS system bison. The bug is a name clash between the VARIABLE token name and the VARIABLE enumerator in ui-out.h. This patch renames VARIABLE in c-exp.y, f-exp.y and p-exp.y to DOLLAR_VARIABLE to avoid the clash. It also renames similar variables in other .y files so that all languages use the same name. gdb/ChangeLog 2019-01-07 Tom Tromey <tom@tromey.com> 2019-01-07 Simon Marchi <simon.marchi@ericsson.com> PR gdb/24060: * ada-exp.y (DOLLAR_VARIABLE): Rename from SPECIAL_VARIABLE. * ada-lex.l (DOLLAR_VARIABLE): Likewise. * c-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE. * f-exp.y (DOLLAR_VARIABLE): Likewise. * m2-exp.y (DOLLAR_VARIABLE): Rename from INTERNAL_VAR. * p-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 5342e6b..5925416 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -151,7 +151,7 @@ static struct type *type_system_address (struct parser_state *);
/* Special type cases, put in to allow the parser to distinguish different
legal basetypes. */
-%token <sval> SPECIAL_VARIABLE
+%token <sval> DOLLAR_VARIABLE
%nonassoc ASSIGN
%left _AND_ OR XOR THEN ELSE
@@ -275,7 +275,7 @@ primary : var_or_type %prec VAR
}
;
-primary : SPECIAL_VARIABLE /* Various GDB extensions */
+primary : DOLLAR_VARIABLE /* Various GDB extensions */
{ write_dollar_variable (pstate, $1); }
;