From 3cab41338d28165c609ef18b622b0decb5850d9d Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Mon, 18 Dec 2000 19:31:54 +0000 Subject: * cppmain.c: Update print.lineno with -P. From-SVN: r38359 --- gcc/ChangeLog | 4 ++++ gcc/cppmain.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 76be2af..37df328 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2000-12-18 Neil Booth + * cppmain.c: Update print.lineno with -P. + +2000-12-18 Neil Booth + * c-lex.c: s/change_file/file_change. * cpplib.h: Similarly. * cppmain.c: Similarly. diff --git a/gcc/cppmain.c b/gcc/cppmain.c index ed6858e..ace260c 100644 --- a/gcc/cppmain.c +++ b/gcc/cppmain.c @@ -284,7 +284,10 @@ maybe_print_line (line) } if (print.no_line_dirs) - return; + { + print.lineno = line; + return; + } /* print.lineno is zero if this is the first token of the file. We handle this specially, so that a first line of "# 1 "foo.c" in -- cgit v1.1