summaryrefslogtreecommitdiffstats
path: root/libcpp/directives.c
diff options
context:
space:
mode:
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-13 23:17:55 +0000
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-13 23:17:55 +0000
commit5b500807ca4cdbe01dea639b319b1ef611a6cd17 (patch)
tree148f0c276cd055d9c2b057991dccf87084ea5216 /libcpp/directives.c
parenteb3880ea6a8829d5f6e35107dae891eafadbf0a3 (diff)
downloadppe42-gcc-5b500807ca4cdbe01dea639b319b1ef611a6cd17.tar.gz
ppe42-gcc-5b500807ca4cdbe01dea639b319b1ef611a6cd17.zip
2009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR cpp/36674 libcpp/ * directives (do_linemarker): Compensate for the increment in location that occurs when we reach the end of line. * files (_cpp_stack_include): Mention _cpp_find_file in the comment. testsuite/ * gcc.dg/cpp/pr36674.i: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147504 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r--libcpp/directives.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c
index e71efb2bd94..74644ff6c77 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -1004,6 +1004,14 @@ do_linemarker (cpp_reader *pfile)
}
skip_rest_of_line (pfile);
+
+ /* Compensate for the increment in linemap_add that occurs in
+ _cpp_do_file_change. We're currently at the start of the line
+ *following* the #line directive. A separate source_location for this
+ location makes no sense (until we do the LC_LEAVE), and
+ complicates LAST_SOURCE_LINE_LOCATION. */
+ pfile->line_table->highest_location--;
+
_cpp_do_file_change (pfile, reason, new_file, new_lineno, new_sysp);
}
OpenPOWER on IntegriCloud