diff options
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/lex.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libcpp/lex.c b/libcpp/lex.c index 6fd722a..3618fa5 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -4480,8 +4480,9 @@ cpp_directive_only_process (cpp_reader *pfile, break; } } - cpp_error_with_line (pfile, CPP_DL_ERROR, sloc, 0, - "unterminated comment"); + if (pos < limit || is_block) + cpp_error_with_line (pfile, CPP_DL_ERROR, sloc, 0, + "unterminated comment"); done_comment: lwm = pos; break; |