summaryrefslogtreecommitdiffstats
path: root/gcc/cppmain.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-19 05:40:08 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-06-19 05:40:08 +0000
commit9c343313ea14c543785f41b5f43e10e530f87d07 (patch)
tree3c3d821dfd3b04ed9aaf9b7fbdf7297ca8b32a1f /gcc/cppmain.c
parent770eb97707cc9f2454a4d2102b79b61ef5bba5c8 (diff)
downloadppe42-gcc-9c343313ea14c543785f41b5f43e10e530f87d07.tar.gz
ppe42-gcc-9c343313ea14c543785f41b5f43e10e530f87d07.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54771 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r--gcc/cppmain.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index 7ebc1ad2c5a..dba64041bf5 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);
+ }
}
}
OpenPOWER on IntegriCloud