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:
@@ -174,7 +174,7 @@ static int GetComma (StrBuf* B)
|
|||||||
Error ("Comma expected");
|
Error ("Comma expected");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
SB_SkipWhite (B);
|
SB_SkipWhite (B);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -675,10 +675,11 @@ static void ParsePragma (void)
|
|||||||
/* Do we know this pragma? */
|
/* Do we know this pragma? */
|
||||||
if (Pragma == PRAGMA_ILLEGAL) {
|
if (Pragma == PRAGMA_ILLEGAL) {
|
||||||
/* According to the ANSI standard, we're not allowed to generate errors
|
/* According to the ANSI standard, we're not allowed to generate errors
|
||||||
* for unknown pragmas, however, we're allowed to warn - and we will
|
* for unknown pragmas, but warn about them if enabled (the default).
|
||||||
* do so. Otherwise one typo may give you hours of bug hunting...
|
|
||||||
*/
|
*/
|
||||||
Warning ("Unknown pragma `%s'", SB_GetConstBuf (&Ident));
|
if (IS_Get (&WarnUnknownPragma)) {
|
||||||
|
Warning ("Unknown pragma `%s'", SB_GetConstBuf (&Ident));
|
||||||
|
}
|
||||||
goto ExitPoint;
|
goto ExitPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user