From: uz Date: Wed, 14 Oct 2009 13:04:38 +0000 (+0000) Subject: Allow switching warnings about unused pragmas on or off. X-Git-Tag: V2.13.1~158 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d9753c2eb778bc064f887755b8f0ee4ca18fad7f;p=cc65 Allow switching warnings about unused pragmas on or off. git-svn-id: svn://svn.cc65.org/cc65/trunk@4366 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- 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; }