diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-01 19:13:53 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-01 19:13:53 +0000 |
commit | 8c2e2fc5143af87fb324348632d9841d57f368de (patch) | |
tree | cb3461c1cc22fa95ff3bb51b1b2b2dbad2132830 /gcc/cpplex.c | |
parent | c176c42da25295de27d18553934efebe3ad2de2b (diff) | |
download | gcc-8c2e2fc5143af87fb324348632d9841d57f368de.tar.gz |
* cpphash.h (struct cpp_buffer): Move saved_flags from cpp_reader.
* cpplex.c (_cpp_lex_token): New token picks up the saved flags,
and AVOID_LPASTE is cleared on meeting an unescaped newline.
* cppmacro.c (builtin_macro): Set builtin flags here.
(paste_all_tokens): Preserve AVOID_LPASTE on pasted token.
(replace_args): Clarify intent.
(cpp_get_token): Macro expansion tokens get the saved flags.
Update.
* cppmain.c (scan_buffer): Remove now-redundant print.printed
check.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index f9431f812fd..3ff23b4abac 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -857,7 +857,8 @@ _cpp_lex_token (pfile, result) done_directive: buffer = pfile->buffer; pfile->state.next_bol = 0; - result->flags = 0; + result->flags = buffer->saved_flags; + buffer->saved_flags = 0; next_char: pfile->lexer_pos.line = buffer->lineno; next_char2: @@ -899,7 +900,7 @@ _cpp_lex_token (pfile, result) /* This is a new line, so clear any white space flag. Newlines in arguments are white space (6.10.3.10); parse_arg takes care of that. */ - result->flags &= ~PREV_WHITE; + result->flags &= ~(PREV_WHITE | AVOID_LPASTE); goto next_char; } @@ -1196,7 +1197,7 @@ _cpp_lex_token (pfile, result) /* Get whitespace right - newline_in_args sets it. */ if (pfile->lexer_pos.col == 1) - result->flags &= ~PREV_WHITE; + result->flags &= ~(PREV_WHITE | AVOID_LPASTE); } else { |