diff options
author | Neil Booth <neil@gcc.gnu.org> | 2002-06-11 05:36:17 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-11 05:36:17 +0000 |
commit | 1a76916c78c985f1622db1b31d4f05e18c8ae9e4 (patch) | |
tree | d6fe32dd73c2bbc61df005aeef06e301cea3ff11 /gcc/cpphash.h | |
parent | b25bb36a36ac5d73a46f9a910c20ecae5e40dc2f (diff) | |
download | gcc-1a76916c78c985f1622db1b31d4f05e18c8ae9e4.zip gcc-1a76916c78c985f1622db1b31d4f05e18c8ae9e4.tar.gz gcc-1a76916c78c985f1622db1b31d4f05e18c8ae9e4.tar.bz2 |
Makefile.in: Update cppmain.o.
* 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.
From-SVN: r54485
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 0fa3e13..ae6a4f2 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -406,10 +406,18 @@ struct cpp_reader /* Whether cpplib owns the hashtable. */ unsigned char our_hashtable; - /* Traditional preprocessing output buffer. */ - uchar *trad_out_base, *trad_out_limit; - uchar *trad_out_cur; - unsigned int trad_line; + /* Traditional preprocessing output buffer (a logical line). */ + struct + { + uchar *base; + uchar *limit; + uchar *cur; + unsigned int first_line; + } out; + + /* Used to save the original line number during traditional + preprocessing. */ + unsigned int saved_line; }; /* Character classes. Based on the more primitive macros in safe-ctype.h. @@ -510,9 +518,10 @@ extern void _cpp_do_file_change PARAMS ((cpp_reader *, enum lc_reason, extern void _cpp_pop_buffer PARAMS ((cpp_reader *)); /* In cpptrad.c. */ -extern bool _cpp_read_logical_line_trad PARAMS ((cpp_reader *, int)); +extern bool _cpp_read_logical_line_trad PARAMS ((cpp_reader *)); extern void _cpp_overlay_buffer PARAMS ((cpp_reader *pfile, const uchar *, size_t)); +extern void _cpp_remove_overlay PARAMS ((cpp_reader *)); extern cpp_hashnode *_cpp_lex_identifier_trad PARAMS ((cpp_reader *)); extern void _cpp_set_trad_context PARAMS ((cpp_reader *)); extern bool _cpp_create_trad_definition PARAMS ((cpp_reader *, cpp_macro *)); |