From d3d6de2704fe9d7b177f68a1a38f6612705ae05d Mon Sep 17 00:00:00 2001 From: acqn Date: Thu, 21 Jul 2022 11:09:56 +0800 Subject: [PATCH] Allowed the pp-tokens following #error and #warning directives to be optional. --- src/cc65/preproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc65/preproc.c b/src/cc65/preproc.c index a607e3217..5057b5d71 100644 --- a/src/cc65/preproc.c +++ b/src/cc65/preproc.c @@ -1028,7 +1028,7 @@ static void DoError (void) { SkipWhitespace (0); if (CurC == '\0') { - PPError ("Invalid #error directive"); + PPError ("#error"); } else { PPError ("#error: %s", SB_GetConstBuf (Line) + SB_GetIndex (Line)); } @@ -1212,7 +1212,7 @@ static void DoWarning (void) { SkipWhitespace (0); if (CurC == '\0') { - PPError ("Invalid #warning directive"); + PPWarning ("#warning"); } else { PPWarning ("#warning: %s", SB_GetConstBuf (Line) + SB_GetIndex (Line)); }