aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-01-13 14:23:04 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-01-13 14:23:04 +0000
commitb61c5ed0058862f8ddd6ac88b7fcc5f6625ab06f (patch)
tree790358caf003cb815d8295a50caabbc24276b785 /gcc/c-lex.c
parentf14269a00c221b575842571ca665eb4b454da1d5 (diff)
downloadgcc-b61c5ed0058862f8ddd6ac88b7fcc5f6625ab06f.zip
gcc-b61c5ed0058862f8ddd6ac88b7fcc5f6625ab06f.tar.gz
gcc-b61c5ed0058862f8ddd6ac88b7fcc5f6625ab06f.tar.bz2
c-lex.c (init_c_lex): Use cpp_get_callbacks to set callbacks.
* c-lex.c (init_c_lex): Use cpp_get_callbacks to set callbacks. * c-parse.in (finish_parse): Use cpp_errors. (__yylex): Use return value of cpp_pop_buffer. * cp/lex.c (finish_parse): Use cpp_errors. * cp/spew.c (read_token): Use return value of cpp_pop_buffer. From-SVN: r38982
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 0cddf7e..f30cd71 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -99,6 +99,7 @@ const char *
init_c_lex (filename)
const char *filename;
{
+ struct cpp_callbacks *cb;
struct c_fileinfo *toplevel;
orig_filename = filename;
@@ -121,16 +122,18 @@ init_c_lex (filename)
GET_ENVIRONMENT (literal_codeset, "LANG");
#endif
- parse_in->cb.ident = cb_ident;
- parse_in->cb.file_change = cb_file_change;
- parse_in->cb.def_pragma = cb_def_pragma;
+ cb = cpp_get_callbacks (parse_in);
+
+ cb->ident = cb_ident;
+ cb->file_change = cb_file_change;
+ cb->def_pragma = cb_def_pragma;
/* Set the debug callbacks if we can use them. */
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& (write_symbols == DWARF_DEBUG || write_symbols == DWARF2_DEBUG))
{
- parse_in->cb.define = cb_define;
- parse_in->cb.undef = cb_undef;
+ cb->define = cb_define;
+ cb->undef = cb_undef;
}
if (filename == 0 || !strcmp (filename, "-"))