diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-15 19:29:14 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-15 19:29:14 +0000 |
commit | dfa5c7fae0b8e0e64ac2282ad193c105c4350e22 (patch) | |
tree | 13e7a6035db05f91cea3851df746122575c0e6a7 /gcc/cpphash.c | |
parent | 13cead115d28fc14b631fef1bf41dac3fd96d70e (diff) | |
download | gcc-dfa5c7fae0b8e0e64ac2282ad193c105c4350e22.tar.gz |
* cpphash.c (save_expansion): Clear PREV_WHITE on tokens
immediately following a paste operator.
* cppinit.c (sort_options): New function (only for HOST_EBCDIC).
(cpp_reader_init): Call it, if HOST_EBCDIC.
(cpp_handle_options): Do not sort option list here.
(handle_option): Rename to cpp_handle_option and export.
* cpplex.c (cpp_scan_buffer_nooutput, cpp_scan_buffer): Use
_cpp_get_token directly.
(cpp_scan_line): Return 0 at EOF, 1 otherwise.
* cpplib.c (cpp_push_buffer): Don't set new->lineno to 1.
* cpplib.h: Prototype cpp_handle_option. Update prototype of
cpp_scan_line.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35052 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r-- | gcc/cpphash.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c index 8c4be523e4b..b7f3944c4e5 100644 --- a/gcc/cpphash.c +++ b/gcc/cpphash.c @@ -576,6 +576,11 @@ save_expansion (pfile, info) dest->flags = token[-1].flags | STRINGIFY_ARG; else dest->flags = token->flags; /* Particularly PREV_WHITE. */ + /* Turn off PREV_WHITE if we immediately follow a paste. + That way, even if the paste turns out to be illegal, there + will be no space between the two tokens in the output. */ + if (token[-1].type == CPP_PASTE) + dest->flags &= ~PREV_WHITE; dest++; continue; @@ -602,6 +607,8 @@ save_expansion (pfile, info) dest->val.str.text = buf; buf += dest->val.str.len; } + if (token[-1].type == CPP_PASTE) + dest->flags &= ~PREV_WHITE; dest++; } |