diff options
author | Neil Booth <neilb@earthling.net> | 2000-11-01 07:32:23 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-11-01 07:32:23 +0000 |
commit | 12c4f523b13177e1c2a39d80cf2e62a37b331f93 (patch) | |
tree | f65234f942514b168d79dfd9f3c583a40d360ea4 | |
parent | 78e7629e9f2b78c8ade485fb2e209427d2696300 (diff) | |
download | gcc-12c4f523b13177e1c2a39d80cf2e62a37b331f93.tar.gz |
c-parse.in (_yylex): Remove CPP_BACKSLASH case.
* 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.
From-SVN: r37182
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/c-parse.in | 1 | ||||
-rw-r--r-- | gcc/cp/spew.c | 4 | ||||
-rw-r--r-- | gcc/cpplex.c | 2 | ||||
-rw-r--r-- | gcc/cpplib.h | 1 | ||||
-rw-r--r-- | gcc/cppmacro.c | 2 |
6 files changed, 10 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c89515b5109..0e509a9496b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/c-parse.in b/gcc/c-parse.in index c590f31ae32..b36264f8b4d 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -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; diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c index 1183dd11177..8faf91b49bd 100644 --- a/gcc/cp/spew.c +++ b/gcc/cp/spew.c @@ -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 (); } diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 43e090bf6fd..68ceb369770 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -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; } diff --git a/gcc/cpplib.h b/gcc/cpplib.h index de7a1a54caa..9b99dcc8f86 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -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 */ \ diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index d4bf337db03..fa9d5fd5b05 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -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; |