From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24715 invoked by alias); 9 Dec 2002 20:37:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24690 invoked from network); 9 Dec 2002 20:37:01 -0000 Received: from unknown (HELO jackfruit.Stanford.EDU) (171.64.38.136) by sources.redhat.com with SMTP; 9 Dec 2002 20:37:01 -0000 Received: (from carlton@localhost) by jackfruit.Stanford.EDU (8.11.6/8.11.6) id gB9Kb0f27707; Mon, 9 Dec 2002 12:37:00 -0800 X-Authentication-Warning: jackfruit.Stanford.EDU: carlton set sender to carlton@math.stanford.edu using -f To: gdb-patches@sources.redhat.com Cc: muller@sources.redhat.com, bemis , clp Subject: [rfa] rename p-exp.y's TRUE/FALSE References: <3DF217D9.57B25A10@iol.unh.edu> From: David Carlton Date: Mon, 09 Dec 2002 12:45:00 -0000 In-Reply-To: <3DF217D9.57B25A10@iol.unh.edu> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00291.txt.bz2 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 * 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 TRUE FALSE +%token 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")) {