Skip to content

Commit 46e6a42

Browse files
committed
Warning mismatch #if / #endif from preprocessor
When an included file is not terminated by means of a `\n` it is possible that we get a warning like: ``` warning: More #if's than #endif's found (might be in an included file). ``` adding the `\n`, as already done with files that are "normally" preprocessed , solves the problem
1 parent 783550e commit 46e6a42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/pre.l

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,7 @@ static std::unique_ptr<FileState> checkAndOpenFile(yyscan_t yyscanner,const QCSt
22592259
}
22602260
else
22612261
{
2262+
addTerminalCharIfMissing(fs->fileBuf,'\n');
22622263
fs->oldFileBuf = state->inputBuf;
22632264
fs->oldFileBufPos = state->inputBufPos;
22642265
}

0 commit comments

Comments
 (0)