From d9753c2eb778bc064f887755b8f0ee4ca18fad7f Mon Sep 17 00:00:00 2001 From: uz Date: Wed, 14 Oct 2009 13:04:38 +0000 Subject: [PATCH] Allow switching warnings about unused pragmas on or off. git-svn-id: svn://svn.cc65.org/cc65/trunk@4366 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/pragma.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cc65/pragma.c b/src/cc65/pragma.c index 684d6a416..510683df1 100644 --- a/src/cc65/pragma.c +++ b/src/cc65/pragma.c @@ -174,7 +174,7 @@ static int GetComma (StrBuf* B) Error ("Comma expected"); return 0; } - SB_SkipWhite (B); + SB_SkipWhite (B); return 1; } @@ -675,10 +675,11 @@ static void ParsePragma (void) /* Do we know this pragma? */ if (Pragma == PRAGMA_ILLEGAL) { /* According to the ANSI standard, we're not allowed to generate errors - * for unknown pragmas, however, we're allowed to warn - and we will - * do so. Otherwise one typo may give you hours of bug hunting... + * for unknown pragmas, but warn about them if enabled (the default). */ - Warning ("Unknown pragma `%s'", SB_GetConstBuf (&Ident)); + if (IS_Get (&WarnUnknownPragma)) { + Warning ("Unknown pragma `%s'", SB_GetConstBuf (&Ident)); + } goto ExitPoint; } -- 2.39.5