OSDN Git Service

* c-parse.in (_yylex): Remove CPP_BACKSLASH case.
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2000 07:32:23 +0000 (07:32 +0000)
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2000 07:32:23 +0000 (07:32 +0000)
* cp/spew.c: Similarly.
* cpplex.c (_cpp_lex_token): Backslashes are now CPP_OTHER.
* cppmacro.c (stringify_arg): Similarly.
* cpplib.h (CPP_BACKSLASH): Delete.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37182 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-parse.in
gcc/cp/spew.c
gcc/cpplex.c
gcc/cpplib.h
gcc/cppmacro.c

index c89515b..0e509a9 100644 (file)
@@ -1,3 +1,11 @@
+2000-11-01  Neil Booth  <neilb@earthling.net>
+
+       * c-parse.in (_yylex): Remove CPP_BACKSLASH case.
+       * cp/spew.c: Similarly.
+       * cpplex.c (_cpp_lex_token): Backslashes are now CPP_OTHER.
+       * cppmacro.c (stringify_arg): Similarly.
+       * cpplib.h (CPP_BACKSLASH): Delete.
+
 2000-10-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * builtins.c (expand_builtin_strstr): New function.
index c590f31..b36264f 100644 (file)
@@ -3259,7 +3259,6 @@ _yylex ()
       /* These tokens should not survive translation phase 4.  */
     case CPP_HASH:
     case CPP_PASTE:
-    case CPP_BACKSLASH:
       error ("syntax error before '%s' token", NAME(last_token));
       goto retry;
 
index 1183dd1..8faf91b 100644 (file)
@@ -361,10 +361,6 @@ read_token (t)
       error ("syntax error before '#' token");
       goto retry;
 
-    case CPP_BACKSLASH:
-      error ("syntax error before '\\' token");
-      goto retry;
-
     default:
       abort ();
     }
index 43e090b..68ceb36 100644 (file)
@@ -931,7 +931,7 @@ _cpp_lex_token (pfile, result)
        result->type = CPP_QUERY;
        buffer->read_ahead = EOF;
        if (c == '\\')
-         result->type = CPP_BACKSLASH;
+         goto random_char;
        else if (c != '?')
          goto do_switch;
       }
index de7a1a5..9b99dcc 100644 (file)
@@ -116,7 +116,6 @@ struct htab;
   /* The remainder of the punctuation.  Order is not significant.  */  \
   OP(CPP_SEMICOLON,    ";")    /* structure */ \
   OP(CPP_ELLIPSIS,     "...")                  \
-  OP(CPP_BACKSLASH,    "\\")                   \
   OP(CPP_PLUS_PLUS,    "++")   /* increment */ \
   OP(CPP_MINUS_MINUS,  "--")                   \
   OP(CPP_DEREF,                "->")   /* accessors */ \
index d4bf337..fa9d5fd 100644 (file)
@@ -386,7 +386,7 @@ stringify_arg (pfile, arg)
        dest = cpp_spell_token (pfile, token, dest);
       total_len = dest - start;
 
-      if (token->type == CPP_BACKSLASH)
+      if (token->type == CPP_OTHER && token->val.aux == '\\')
        backslash_count++;
       else
        backslash_count = 0;