aboutsummaryrefslogtreecommitdiff
path: root/libcpp/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/files.c')
-rw-r--r--libcpp/files.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libcpp/files.c b/libcpp/files.c
index 06ccd0fd695..c8c19021f56 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -912,13 +912,14 @@ _cpp_stack_include (cpp_reader *pfile, const char *fname, int angle_brackets,
file = _cpp_find_file (pfile, fname, dir, false, angle_brackets);
- /* Compensate for the increment in linemap_add. In the case of a
- normal #include, we're currently at the start of the line
- *following* the #include. A separate source_location for this
- location makes no sense (until we do the LC_LEAVE), and
- complicates LAST_SOURCE_LINE_LOCATION. This does not apply if we
- found a PCH file (in which case linemap_add is not called) or we
- were included from the command-line. */
+ /* Compensate for the increment in linemap_add that occurs in
+ _cpp_stack_file. In the case of a normal #include, we're
+ currently at the start of the line *following* the #include. A
+ separate source_location for this location makes no sense (until
+ we do the LC_LEAVE), and complicates LAST_SOURCE_LINE_LOCATION.
+ This does not apply if we found a PCH file (in which case
+ linemap_add is not called) or we were included from the
+ command-line. */
if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
pfile->line_table->highest_location--;