From: John Gilmore Date: Sat, 23 Nov 1991 05:26:22 +0000 (+0000) Subject: * m2-exp.y (MAX, MIN): Rename to MAX_FUNC, MIN_FUNC to avoid X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71302249676da6aa837401a92b117eda7588b894;p=binutils-gdb.git * m2-exp.y (MAX, MIN): Rename to MAX_FUNC, MIN_FUNC to avoid conflicts with system header files. --- diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 72619e74842..3829758ca44 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -39,11 +39,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "value.h" #include "parser-defs.h" -/* In case the system defines these as macros, get rid of them; we use - them as tokens. */ -#undef MAX -#undef MIN - /* These MUST be included in any grammar file!!!! Please choose unique names! */ #define yymaxdepth m2_maxdepth @@ -136,7 +131,7 @@ char *make_qualname(); %token NAME BLOCKNAME IDENT CONST VARNAME %token TYPENAME -%token SIZE CAP ORD HIGH ABS MIN MAX FLOAT_FUNC VAL CHR ODD TRUNC +%token SIZE CAP ORD HIGH ABS MIN_FUNC MAX_FUNC FLOAT_FUNC VAL CHR ODD TRUNC %token INC DEC INCL EXCL /* The GDB scope operator */ @@ -216,13 +211,13 @@ exp : HIGH '(' exp ')' { write_exp_elt_opcode (UNOP_HIGH); } ; -exp : MIN '(' type ')' +exp : MIN_FUNC '(' type ')' { write_exp_elt_opcode (UNOP_MIN); write_exp_elt_type ($3); write_exp_elt_opcode (UNOP_MIN); } ; -exp : MAX '(' type ')' +exp : MAX_FUNC '(' type ')' { write_exp_elt_opcode (UNOP_MAX); write_exp_elt_type ($3); write_exp_elt_opcode (UNOP_MIN); } @@ -804,8 +799,8 @@ static struct keyword keytab[] = {"NOT", NOT }, {"DIV", DIV }, {"INC", INC }, - {"MAX", MAX }, - {"MIN", MIN }, + {"MAX", MAX_FUNC }, + {"MIN", MIN_FUNC }, {"MOD", MOD }, {"ODD", ODD }, {"CAP", CAP },