1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00

Fixed newline counting inside old C style comments.

This commit is contained in:
acqn 2022-09-01 12:58:52 +08:00
parent 3d1e322519
commit 770e529b20

View File

@ -878,7 +878,7 @@ static void Stringize (StrBuf* Source, StrBuf* Target)
static void OldStyleComment (void) static void OldStyleComment (void)
/* Remove an old style C comment from line. */ /* Remove an old style C comment from line */
{ {
/* Remember the current line number, so we can output better error /* Remember the current line number, so we can output better error
** messages if the comment is not terminated in the current file. ** messages if the comment is not terminated in the current file.
@ -897,6 +897,7 @@ static void OldStyleComment (void)
StartingLine); StartingLine);
return; return;
} }
++PendingNewLines;
} else { } else {
if (CurC == '/' && NextC == '*') { if (CurC == '/' && NextC == '*') {
PPWarning ("'/*' found inside a comment"); PPWarning ("'/*' found inside a comment");
@ -913,7 +914,7 @@ static void OldStyleComment (void)
static void NewStyleComment (void) static void NewStyleComment (void)
/* Remove a new style C comment from line. */ /* Remove a new style C comment from line */
{ {
/* Diagnose if this is unsupported */ /* Diagnose if this is unsupported */
if (IS_Get (&Standard) < STD_C99) { if (IS_Get (&Standard) < STD_C99) {