diff options
author | John Gilmore <gnu@cygnus> | 1991-11-23 05:26:22 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-11-23 05:26:22 +0000 |
commit | 71302249676da6aa837401a92b117eda7588b894 (patch) | |
tree | 42f0517e6026398f4636053b6ef48682a70d5d48 /gdb/m2-exp.y | |
parent | 378d8e737ca0813cffc0d759e24dbaa05775eca7 (diff) | |
download | gdb-71302249676da6aa837401a92b117eda7588b894.zip gdb-71302249676da6aa837401a92b117eda7588b894.tar.gz gdb-71302249676da6aa837401a92b117eda7588b894.tar.bz2 |
* m2-exp.y (MAX, MIN): Rename to MAX_FUNC, MIN_FUNC to avoid
conflicts with system header files.
Diffstat (limited to 'gdb/m2-exp.y')
-rw-r--r-- | gdb/m2-exp.y | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 72619e7..3829758 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 <sval> NAME BLOCKNAME IDENT CONST VARNAME %token <sval> 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 }, |