]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-common.h (RID_AND, [...]): Remove.
authorNeil Booth <neil@daikokuya.co.uk>
Fri, 26 Jul 2002 16:23:07 +0000 (16:23 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Fri, 26 Jul 2002 16:23:07 +0000 (16:23 +0000)
* 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

gcc/ChangeLog
gcc/c-common.h
gcc/c-parse.in
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/lex.c
gcc/cp/spew.c

index dbcc464ef8e34cd4783f51d19e11ee2a39791364..21f149e4d15f54597b3df0440c93a227cffe0259 100644 (file)
@@ -1,3 +1,10 @@
+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.
index abdd859c54e1c41b3fed0c0d83ddf8dd23cf305b..f7191fa6c7f2a3c357496004f3d5a7ec13ce19a0 100644 (file)
@@ -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,
index 70d95f115da0309896612ee63acda4ab215d41d2..b726f5a1bd38cb85209b9d0ea1000a012abba7bd 100644 (file)
@@ -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,
index bd9af440946e35c3dd6796896432ce7380bc2d72..8fd963b3eadd93314e28b67a19a0276a638b4a7b 100644 (file)
@@ -1,3 +1,15 @@
+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.
index 291caf65a3fca27327dc9f9c178a02b2e068b1ad..6a2bda39dab426b0a041097df51b77fe5862d297 100644 (file)
@@ -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;
index 2b6bd254e5f4bed237854aa8dc7b2838ad7ab37b..08fd777db39a7ac4f48d29320e55beb44c38c029 100644 (file)
@@ -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},
index 412b3c5e2dbbaf9d92f895fe3d9ad02a5d1f5c88..e6fad8a37dfa2d9ab9ea70dad1c8f9143038faae 100644 (file)
@@ -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
index 85f5cdac77234e2b2e7b364e46e1dfd1af93a0d5..2c34192db2fe8f74cfd820e5cb987af8c45d708f 100644 (file)
@@ -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