aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-02-20 19:23:42 +0000
committerJohn Gilmore <gnu@cygnus>1992-02-20 19:23:42 +0000
commit088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b (patch)
tree0ce19e10e2ec6ba41392bf245df0841bfde317bc /gdb/c-exp.y
parent8b87cbae28c26fd9b5bed99eb134f6c66ee946ac (diff)
downloadgdb-088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b.zip
gdb-088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b.tar.gz
gdb-088c3a0b74c7431d31ec5d095f4e68bdd2d90c0b.tar.bz2
* defs.h: Include ansidecl.h and PARAMS macro. Use PARAMS
to make prototypes for all functions declared here. * cplus-dem.c: Avoid declaring xmalloc and xrealloc. * c-exp.y: Rename SIGNED, OR, and AND to avoid conflict. * environ.c: Include <stdio.h> before defs.h. Minor cleanup. * ieee-float.h: Use PARAMS for prototypes; make some params const. * ieee-float.c, valarith.c: Include <stdio.h>. Lint. b*=>mem*. * m2-exp.y: Remove unused CONST; Rename OR and AND. * utils.c: Avoid declaring malloc and realloc. Lint. (request_quit): Accept signal-number parameter.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 6592076..ea41e64 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -142,7 +142,7 @@ int yyparse ();
/* Special type cases, put in to allow the parser to distinguish different
legal basetypes. */
-%token SIGNED LONG SHORT INT_KEYWORD
+%token SIGNED_KEYWORD LONG SHORT INT_KEYWORD
%token <lval> LAST REGNAME
@@ -157,8 +157,8 @@ int yyparse ();
%left ABOVE_COMMA
%right '=' ASSIGN_MODIFY
%right '?'
-%left OR
-%left AND
+%left OROR
+%left ANDAND
%left '|'
%left '^'
%left '&'
@@ -362,11 +362,11 @@ exp : exp '|' exp
{ write_exp_elt_opcode (BINOP_LOGIOR); }
;
-exp : exp AND exp
+exp : exp ANDAND exp
{ write_exp_elt_opcode (BINOP_AND); }
;
-exp : exp OR exp
+exp : exp OROR exp
{ write_exp_elt_opcode (BINOP_OR); }
;
@@ -830,9 +830,9 @@ typebase
{ $$ = lookup_unsigned_typename (TYPE_NAME($2.type)); }
| UNSIGNED
{ $$ = builtin_type_unsigned_int; }
- | SIGNED typename
+ | SIGNED_KEYWORD typename
{ $$ = $2.type; }
- | SIGNED
+ | SIGNED_KEYWORD
{ $$ = builtin_type_int; }
| TEMPLATE name '<' type '>'
{ $$ = lookup_template_type(copy_name($2), $4,
@@ -1028,8 +1028,8 @@ const static struct token tokentab2[] =
{"++", INCREMENT, BINOP_END},
{"--", DECREMENT, BINOP_END},
{"->", ARROW, BINOP_END},
- {"&&", AND, BINOP_END},
- {"||", OR, BINOP_END},
+ {"&&", ANDAND, BINOP_END},
+ {"||", OROR, BINOP_END},
{"::", COLONCOLON, BINOP_END},
{"<<", LSH, BINOP_END},
{">>", RSH, BINOP_END},
@@ -1305,7 +1305,7 @@ yylex ()
if (!strncmp (tokstart, "struct", 6))
return STRUCT;
if (!strncmp (tokstart, "signed", 6))
- return SIGNED;
+ return SIGNED_KEYWORD;
if (!strncmp (tokstart, "sizeof", 6))
return SIZEOF;
break;