Commit c372b0fa by Neil Booth Committed by Neil Booth

c-common.h (RID_AND, [...]): Remove.

	* c-common.h (RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ,
	RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, RID_BITAND, RID_BITOR,
	RID_COMPL): Remove.
	* c-parse.in (rid_to_yy): Similarly.
cp:
	* cp-tree.h (flag_operator_names): Remove.
	* decl2.c (flag_operator_names): Remove.
	(lang_f_options): Remove operator-names.
	* lex.c (D_OPNAME): Remove.
	(reswords): Remove operator names.
	(rid_to_yy): Remove operator names.
	(init_reswords): No need to handle D_OPNAME.
	* spew.c (read_process_identifier): There are no operator
	names.

From-SVN: r55777
parent 558ee214
2002-07-26 Neil Booth <neil@daikokuya.co.uk>
* c-common.h (RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ,
RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, RID_BITAND, RID_BITOR,
RID_COMPL): Remove.
* c-parse.in (rid_to_yy): Similarly.
2002-07-26 Jason Merrill <jason@redhat.com>
* c-dump.c: Resurrect.
......
......@@ -93,11 +93,6 @@ enum rid
/* casts */
RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST,
/* alternate spellings */
RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ,
RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ,
RID_BITAND, RID_BITOR, RID_COMPL,
/* Objective C */
RID_ID, RID_AT_ENCODE, RID_AT_END,
RID_AT_CLASS, RID_AT_ALIAS, RID_AT_DEFS,
......
......@@ -3522,19 +3522,6 @@ static const short rid_to_yy[RID_MAX] =
/* RID_REINTCAST */ 0,
/* RID_STATCAST */ 0,
/* alternate spellings */
/* RID_AND */ 0,
/* RID_AND_EQ */ 0,
/* RID_NOT */ 0,
/* RID_NOT_EQ */ 0,
/* RID_OR */ 0,
/* RID_OR_EQ */ 0,
/* RID_XOR */ 0,
/* RID_XOR_EQ */ 0,
/* RID_BITAND */ 0,
/* RID_BITOR */ 0,
/* RID_COMPL */ 0,
/* Objective C */
/* RID_ID */ OBJECTNAME,
/* RID_AT_ENCODE */ ENCODE,
......
2002-07-26 Neil Booth <neil@daikokuya.co.uk>
* cp-tree.h (flag_operator_names): Remove.
* decl2.c (flag_operator_names): Remove.
(lang_f_options): Remove operator-names.
* lex.c (D_OPNAME): Remove.
(reswords): Remove operator names.
(rid_to_yy): Remove operator names.
(init_reswords): No need to handle D_OPNAME.
* spew.c (read_process_identifier): There are no operator
names.
2002-07-26 Jason Merrill <jason@redhat.com>
* dump.c (cp_dump_tree): Call c_dump_tree.
......
......@@ -945,10 +945,6 @@ extern int flag_no_asm;
extern int flag_no_gnu_keywords;
/* Nonzero means recognize the named operators from C++98. */
extern int flag_operator_names;
/* For environments where you can use GNU binutils (as, ld in particular). */
extern int flag_gnu_binutils;
......
......@@ -331,10 +331,6 @@ int flag_conserve_space;
int flag_access_control = 1;
/* Nonzero if we want to understand the operator names, i.e. 'bitand'. */
int flag_operator_names = 1;
/* Nonzero if we want to check the return value of new and avoid calling
constructors if it is a null pointer. */
......@@ -420,7 +416,6 @@ lang_f_options[] =
{"implicit-templates", &flag_implicit_templates, 1},
{"ms-extensions", &flag_ms_extensions, 1},
{"nonansi-builtins", &flag_no_nonansi_builtin, 0},
{"operator-names", &flag_operator_names, 1},
{"optional-diags", &flag_optional_diags, 1},
{"permissive", &flag_permissive, 1},
{"repo", &flag_use_repository, 1},
......
......@@ -328,7 +328,6 @@ struct resword
_true_. */
#define D_EXT 0x01 /* GCC extension */
#define D_ASM 0x02 /* in C99, but has a switch to turn it off */
#define D_OPNAME 0x04 /* operator names */
CONSTRAINT(ridbits_fit, RID_LAST_MODIFIER < sizeof(unsigned long) * CHAR_BIT);
......@@ -368,18 +367,13 @@ static const struct resword reswords[] =
{ "__volatile", RID_VOLATILE, 0 },
{ "__volatile__", RID_VOLATILE, 0 },
{ "asm", RID_ASM, D_ASM },
{ "and", RID_AND, D_OPNAME },
{ "and_eq", RID_AND_EQ, D_OPNAME },
{ "auto", RID_AUTO, 0 },
{ "bitand", RID_BITAND, D_OPNAME },
{ "bitor", RID_BITOR, D_OPNAME },
{ "bool", RID_BOOL, 0 },
{ "break", RID_BREAK, 0 },
{ "case", RID_CASE, 0 },
{ "catch", RID_CATCH, 0 },
{ "char", RID_CHAR, 0 },
{ "class", RID_CLASS, 0 },
{ "compl", RID_COMPL, D_OPNAME },
{ "const", RID_CONST, 0 },
{ "const_cast", RID_CONSTCAST, 0 },
{ "continue", RID_CONTINUE, 0 },
......@@ -405,11 +399,7 @@ static const struct resword reswords[] =
{ "mutable", RID_MUTABLE, 0 },
{ "namespace", RID_NAMESPACE, 0 },
{ "new", RID_NEW, 0 },
{ "not", RID_NOT, D_OPNAME },
{ "not_eq", RID_NOT_EQ, D_OPNAME },
{ "operator", RID_OPERATOR, 0 },
{ "or", RID_OR, D_OPNAME },
{ "or_eq", RID_OR_EQ, D_OPNAME },
{ "private", RID_PRIVATE, 0 },
{ "protected", RID_PROTECTED, 0 },
{ "public", RID_PUBLIC, 0 },
......@@ -440,8 +430,6 @@ static const struct resword reswords[] =
{ "volatile", RID_VOLATILE, 0 },
{ "wchar_t", RID_WCHAR, 0 },
{ "while", RID_WHILE, 0 },
{ "xor", RID_XOR, D_OPNAME },
{ "xor_eq", RID_XOR_EQ, D_OPNAME },
};
......@@ -557,19 +545,6 @@ const short rid_to_yy[RID_MAX] =
/* RID_REINTCAST */ REINTERPRET_CAST,
/* RID_STATCAST */ STATIC_CAST,
/* alternate spellings */
/* RID_AND */ ANDAND,
/* RID_AND_EQ */ ASSIGN,
/* RID_NOT */ '!',
/* RID_NOT_EQ */ EQCOMPARE,
/* RID_OR */ OROR,
/* RID_OR_EQ */ ASSIGN,
/* RID_XOR */ '^',
/* RID_XOR_EQ */ ASSIGN,
/* RID_BITAND */ '&',
/* RID_BITOR */ '|',
/* RID_COMPL */ '~',
/* Objective C */
/* RID_ID */ 0,
/* RID_AT_ENCODE */ 0,
......@@ -591,8 +566,7 @@ init_reswords ()
{
unsigned int i;
tree id;
int mask = ((flag_operator_names ? 0 : D_OPNAME)
| (flag_no_asm ? D_ASM : 0)
int mask = ((flag_no_asm ? D_ASM : 0)
| (flag_no_gnu_keywords ? D_EXT : 0));
/* It is not necessary to register ridpointers as a GC root, because
......
......@@ -207,23 +207,8 @@ read_process_identifier (pyylval)
if (C_IS_RESERVED_WORD (id))
{
/* Possibly replace the IDENTIFIER_NODE with a magic cookie.
Can't put yylval.code numbers in ridpointers[]. Bleah. */
switch (C_RID_CODE (id))
{
case RID_BITAND: pyylval->code = BIT_AND_EXPR; return '&';
case RID_AND_EQ: pyylval->code = BIT_AND_EXPR; return ASSIGN;
case RID_BITOR: pyylval->code = BIT_IOR_EXPR; return '|';
case RID_OR_EQ: pyylval->code = BIT_IOR_EXPR; return ASSIGN;
case RID_XOR: pyylval->code = BIT_XOR_EXPR; return '^';
case RID_XOR_EQ: pyylval->code = BIT_XOR_EXPR; return ASSIGN;
case RID_NOT_EQ: pyylval->code = NE_EXPR; return EQCOMPARE;
default:
pyylval->ttype = ridpointers[C_RID_CODE (id)];
return C_RID_YYCODE (id);
}
pyylval->ttype = ridpointers[C_RID_CODE (id)];
return C_RID_YYCODE (id);
}
/* Make sure that user does not collide with our internal naming
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment