From: David Carlton <carlton@math.stanford.edu>
To: gdb-patches@sources.redhat.com
Cc: muller@sources.redhat.com, bemis <bemis@iol.unh.edu>,
clp <clp@iol.unh.edu>
Subject: [rfa] rename p-exp.y's TRUE/FALSE
Date: Mon, 09 Dec 2002 12:45:00 -0000 [thread overview]
Message-ID: <ro14r9nyln7.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <3DF217D9.57B25A10@iol.unh.edu>
In p-exp.y there are tokens TRUE and FALSE; a recent change to bfd.h
also created defines named TRUE and FALSE. This might cause silent
problems and one user has reported that this causes actual compilation
problems (it depends on which order the defines happen in).
This patch renames the tokens to TRUEKEYWORD and FALSEKEYWORD,
following the lead of c-exp.y.
Okay to commit?
David Carlton
carlton@math.stanford.edu
2002-12-09 David Carlton <carlton@math.stanford.edu>
* p-exp.y: Rename TRUE and FALSE to TRUEKEYWORD and FALSEKEYWORD.
Index: p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.20
diff -u -p -r1.20 p-exp.y
--- p-exp.y 30 Nov 2002 16:33:55 -0000 1.20
+++ p-exp.y 9 Dec 2002 20:12:22 -0000
@@ -205,7 +205,7 @@ static int search_field;
/* Object pascal */
%token THIS
-%token <lval> TRUE FALSE
+%token <lval> TRUEKEYWORD FALSEKEYWORD
%left ','
%left ABOVE_COMMA
@@ -434,13 +434,13 @@ exp : exp ASSIGN exp
{ write_exp_elt_opcode (BINOP_ASSIGN); }
;
-exp : TRUE
+exp : TRUEKEYWORD
{ write_exp_elt_opcode (OP_BOOL);
write_exp_elt_longcst ((LONGEST) $1);
write_exp_elt_opcode (OP_BOOL); }
;
-exp : FALSE
+exp : FALSEKEYWORD
{ write_exp_elt_opcode (OP_BOOL);
write_exp_elt_longcst ((LONGEST) $1);
write_exp_elt_opcode (OP_BOOL); }
@@ -1379,14 +1379,14 @@ yylex ()
if (STREQ (uptokstart, "FALSE"))
{
yylval.lval = 0;
- return FALSE;
+ return FALSEKEYWORD;
}
break;
case 4:
if (STREQ (uptokstart, "TRUE"))
{
yylval.lval = 1;
- return TRUE;
+ return TRUEKEYWORD;
}
if (STREQ (uptokstart, "SELF"))
{
next parent reply other threads:[~2002-12-09 20:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3DF217D9.57B25A10@iol.unh.edu>
2002-12-09 12:45 ` David Carlton [this message]
2002-12-09 12:51 ` Andrew Cagney
2002-12-09 13:15 ` David Carlton
2002-12-10 7:46 ` Pierre Muller
2002-12-10 8:04 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ro14r9nyln7.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=bemis@iol.unh.edu \
--cc=clp@iol.unh.edu \
--cc=gdb-patches@sources.redhat.com \
--cc=muller@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox