diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-11 05:36:17 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-11 05:36:17 +0000 |
commit | fb83e0d681031355d3df7f1d38c352f1773aa6b4 (patch) | |
tree | d6fe32dd73c2bbc61df005aeef06e301cea3ff11 /gcc/cppinit.c | |
parent | 29dcbe46ff709e200b4885d7ef63a2ec3f52b3f4 (diff) | |
download | gcc-fb83e0d681031355d3df7f1d38c352f1773aa6b4.tar.gz |
* Makefile.in: Update cppmain.o.
* cpphash.h (struct cpp_reader): Move some members to a
nested structure.
(trad_line): Rename saved_line.
(_cpp_read_logical_line_trad): Update.
(_cpp_remove_overlay): New.
* cppinit.c (cpp_create_reader): No need to set saved_line.
(cpp_destroy): Update.
(cpp_read_main_file): Only overlay if compiling.
* cpplex.c (continue_after_nul): Return false if in directive.
* cpplib.c (EXPAND): New.
(directive_table, SEEN_EOL): Update.
(end_directive): Remove overlay if traditional; don't skip
line in traditional #define.
(prepare_directive_trad): New.
(_cpp_handle_directive, run_directive): Update for traditional
directives.
(lex_macro_node): Simplify, don't use lex_identifier_trad.
* cpplib.h (struct options): Add preprocess_only.
* cppmain.c: Don't include intl.h.
(cpp_preprocess_file): Set options->preprocess_only.
(scan_translation_unit_trad): Fix, and print line numbers.
* cpptrad.c (check_output_buffer, lex_identifier, scan_parameters,
maybe_start_funlike, scan_out_logical_line, replace_args_and_push,
save_replacement_text, _cpp_create_trad_definition): Update for
variable renaming.
(_cpp_overlay_buffer): Save line number.
(_cpp_remove_overlay): Rename from restore_buff, restore line.
(_cpp_read_logical_line_trad): Don't handle overlays here.
(scan_out_logical_line): Process directives.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 466c7c582dd..411dbea1d13 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -506,7 +506,7 @@ cpp_create_reader (lang) /* Initialise the line map. Start at logical line 1, so we can use a line number of zero for special states. */ init_line_maps (&pfile->line_maps); - pfile->trad_line = pfile->line = 1; + pfile->line = 1; /* Initialize lexer state. */ pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); @@ -561,8 +561,8 @@ cpp_destroy (pfile) while (CPP_BUFFER (pfile) != NULL) _cpp_pop_buffer (pfile); - if (pfile->trad_out_base) - free (pfile->trad_out_base); + if (pfile->out.base) + free (pfile->out.base); if (pfile->macro_buffer) { @@ -941,7 +941,8 @@ cpp_read_main_file (pfile, fname, table) if (CPP_OPTION (pfile, preprocessed)) read_original_filename (pfile); /* Overlay an empty buffer to seed traditional preprocessing. */ - else if (CPP_OPTION (pfile, traditional)) + else if (CPP_OPTION (pfile, traditional) + && !CPP_OPTION (pfile, preprocess_only)) _cpp_overlay_buffer (pfile, U"", 0); return pfile->map->to_file; |