diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-09-14 22:04:46 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-09-14 22:04:46 +0000 |
commit | 972938978677f76ef6af494932345945947852ee (patch) | |
tree | 4c00cb933362af65600541484760cce6502de1a6 /gcc/cppinit.c | |
parent | 4fb1661fea89a2d72f69dcbe341e253d4b3fffe3 (diff) | |
download | gcc-972938978677f76ef6af494932345945947852ee.zip gcc-972938978677f76ef6af494932345945947852ee.tar.gz gcc-972938978677f76ef6af494932345945947852ee.tar.bz2 |
cpperror.c (print_location): Take line and column, for default positioning use the previously lexed token.
* cpperror.c (print_location): Take line and column, for
default positioning use the previously lexed token.
(_cpp_begin_message): Take line and column.
(cpp_ice, cpp_fatal, cpp_error, cpp_error_with_line, cpp_warning,
cpp_warning_with_line, cpp_pedwarn, cpp_pedwarn_with_line): Update.
* cpphash.h (_cpp_begin_message): Update prototype.
* cppinit.c (push_include): Don't set output line.
* cpplex.c (_cpp_lex_token): Callback for start of new output lines.
* cpplib.c (do_diagnostic, _cpp_pop_buffer): Update.
(do_pragma): Kludge for front ends. Don't expand macros at all.
* cpplib.h (cpp_lookahead, cpp_token_with_pos, cpp_get_line): Remove.
(struct cpp_token): Remove output_line.
(struct cpp_callbacks): New member line_change.
* cppmacro.c (builtin_macro, paste_all_tokens, replace_args,
cpp_get_token): Preserve BOL flag.
(cpp_get_line): Remove.
(_cpp_backup_tokens): Remove useless abort().
* cppmain.c (cb_line_change): New.
(scan_translation_unit): Don't worry about starting new lines here.
* scan-decls.c (scan_decls): Update.
* c-lex.c (c_lex, init_c_lex): Update.
(cb_line_change, src_lineno): New.
From-SVN: r45613
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 2cf7461..94e1198 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -886,7 +886,7 @@ push_include (pfile, p) header.val.str.text = (const unsigned char *) p->arg; header.val.str.len = strlen (p->arg); /* Make the command line directive take up a line. */ - pfile->lexer_pos.line = pfile->lexer_pos.output_line = ++pfile->line; + pfile->lexer_pos.line = ++pfile->line; return _cpp_execute_include (pfile, &header, IT_CMDLINE); } |