1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-30 08:57:49 +00:00

Allow switching warnings about unused pragmas on or off.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4366 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-10-14 13:04:38 +00:00
parent 62fdd55fee
commit d9753c2eb7

View File

@ -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;
}