aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r--libcpp/directives.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c
index 29d21ed..1c6b31e 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -818,6 +818,10 @@ do_include_common (cpp_reader *pfile, enum include_type type)
callback can dump comments which follow #include. */
pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments);
+ /* Tell the lexer this is an include directive -- we want it to
+ increment the line number even if this is the last line of a file. */
+ pfile->state.in_directive = 2;
+
fname = parse_include (pfile, &angle_brackets, &buf, &location);
if (!fname)
goto done;