diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2002-06-19 05:40:08 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-19 05:40:08 +0000 |
commit | 278c466207b2d592d8ea21234d6cb228b95bc246 (patch) | |
tree | 3c3d821dfd3b04ed9aaf9b7fbdf7297ca8b32a1f /gcc/cppmain.c | |
parent | 9d7b4c5a4ff06264dd94b5da29bd32ffc8e4435a (diff) | |
download | gcc-278c466207b2d592d8ea21234d6cb228b95bc246.zip gcc-278c466207b2d592d8ea21234d6cb228b95bc246.tar.gz gcc-278c466207b2d592d8ea21234d6cb228b95bc246.tar.bz2 |
cpphash.h (struct cpp_reader): Make date and time strings.
* cpphash.h (struct cpp_reader): Make date and time strings.
(_cpp_builtin_macro_text, _cpp_copy_replacement_text,
_cpp_replacement_text_len): New.
* cppinit.c (cpp_create_reader): Update.
(init_builtins): Register appropriate builtins for -traditional-cpp.
* cppmacro.c (new_number_token): Remove.
(_cpp_builtin_macro_text): New.
(builtin_macro): Use it.
(cpp_macro_definition): Update to handle traditional macros.
* cppmain.c (cb_line_change): Don't do column positioning for
traditional output.
* cpptrad.c (enum ls): Rename ls_fun_macro to ls_fun_open. New
state ls_fun_close.
(skip_whitespace): Fix.
(maybe_start_funlike): Don't set state.parsing_args.
(scan_out_logical_line): Remove duplicate error. Use lex_state
rather than state.parsing_args.
(push_replacement_text): Handle builtins.
(_cpp_replacement_text_len, _cpp_copy_replacement_text): New.
From-SVN: r54771
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r-- | gcc/cppmain.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c index 7ebc1ad..dba6404 100644 --- a/gcc/cppmain.c +++ b/gcc/cppmain.c @@ -320,7 +320,6 @@ cb_line_change (pfile, token, parsing_args) return; maybe_print_line (print.map, token->line); - print.printed = 1; print.prev = 0; print.source = 0; @@ -329,12 +328,16 @@ cb_line_change (pfile, token, parsing_args) will provide a space if PREV_WHITE. Don't bother trying to reconstruct tabs; we can't get it right in general, and nothing ought to care. Some things do care; the fault lies with them. */ - if (token->col > 2) + if (!CPP_OPTION (pfile, traditional)) { - unsigned int spaces = token->col - 2; + print.printed = 1; + if (token->col > 2) + { + unsigned int spaces = token->col - 2; - while (spaces--) - putc (' ', print.outf); + while (spaces--) + putc (' ', print.outf); + } } } |