diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-18 19:31:54 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-18 19:31:54 +0000 |
commit | 5e7a87efc3ba6c3cddd82abd87d4117cd6d1e334 (patch) | |
tree | 9aed63aebabbb5670ee31788d2491bbef6100475 | |
parent | 78a67386e4b4d2ce21fd6260510fc6495a90bda6 (diff) | |
download | gcc-5e7a87efc3ba6c3cddd82abd87d4117cd6d1e334.tar.gz |
* cppmain.c: Update print.lineno with -P.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38359 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cppmain.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 76be2af5850..37df328f493 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2000-12-18 Neil Booth <neil@daikokuya.demon.co.uk> + * cppmain.c: Update print.lineno with -P. + +2000-12-18 Neil Booth <neil@daikokuya.demon.co.uk> + * 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 ed6858e3c1f..ace260ca8ca 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 |