diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-13 21:16:00 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-13 21:16:00 +0000 |
commit | c455fac3b6e5ac4e62cc45153d926de62d98d9f7 (patch) | |
tree | 84d2f1068a69ffbe2208c366f6d8d1f3c43b05d2 /gcc/cpplib.c | |
parent | 493914a8e47faf38cc3fa8da31a083869318a297 (diff) | |
download | ppe42-gcc-c455fac3b6e5ac4e62cc45153d926de62d98d9f7.tar.gz ppe42-gcc-c455fac3b6e5ac4e62cc45153d926de62d98d9f7.zip |
* cpphash.h (_cpp_lex_identifier_trad): Remove.
* cpplib.c (end_directive): Don't skip, always remove overlay
apart from #define.
(prepare_directive_trad): Handle NULL pfile->directive.
(_cpp_handle_directive): Always call prepare_directive_trad
if traditional.
* cppmain.c (check_multiline_token): Rename account_for_newlines,
generalize inputs.
(scan_translation_unit_trad): Use it.
* cpptrad.c (skip_comment): Rename copy_comment, copy comment to
output, get escaped newline in comment close correct.
(check_output_buffer, skip_whitespace): Update.
(_cpp_lex_identifier_trad): Remove.
(scan_out_logical_line): Handle -C and comments in directives
properly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r-- | gcc/cpplib.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c index acc71e7120a..aecfbaf0edd 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -256,14 +256,11 @@ end_directive (pfile, skip_line) { if (CPP_OPTION (pfile, traditional)) { - if (!pfile->directive || pfile->directive == &dtable[T_DEFINE]) - skip_line = false; - else + if (pfile->directive != &dtable[T_DEFINE]) _cpp_remove_overlay (pfile); } - /* We don't skip for an assembler #. */ - if (skip_line) + else if (skip_line) { skip_rest_of_line (pfile); if (!pfile->keep_tokens) @@ -289,7 +286,8 @@ prepare_directive_trad (pfile) CUR (pfile->context) = pfile->buffer->cur; else { - bool no_expand = ! (pfile->directive->flags & EXPAND); + bool no_expand = (pfile->directive + && ! (pfile->directive->flags & EXPAND)); bool was_skipping = pfile->state.skipping; pfile->state.skipping = false; @@ -382,6 +380,10 @@ _cpp_handle_directive (pfile, indented) "style of line directive is a GCC extension"); } + pfile->directive = dir; + if (CPP_OPTION (pfile, traditional)) + prepare_directive_trad (pfile); + if (dir) { /* If we have a directive that is not an opening conditional, @@ -441,9 +443,6 @@ _cpp_handle_directive (pfile, indented) pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments_in_macro_exp); - pfile->directive = dir; - if (CPP_OPTION (pfile, traditional)) - prepare_directive_trad (pfile); (*pfile->directive->handler) (pfile); } else if (skip == 0) |