--warnings-as-errors for ca65 and ld65
This commit is contained in:
@@ -559,6 +559,15 @@ static void OptVersion (const char* Opt attribute ((unused)),
|
||||
|
||||
|
||||
|
||||
static void OptWarningsAsErrors (const char* Opt attribute ((unused)),
|
||||
const char* Arg attribute ((unused)))
|
||||
/* Generate an error if any warnings occur */
|
||||
{
|
||||
WarningsAsErrors = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void OptMultDef (const char* Opt attribute ((unused)),
|
||||
const char* Arg attribute ((unused)))
|
||||
/* Set flag to allow multiple definitions of a global symbol */
|
||||
@@ -637,6 +646,7 @@ static void ParseCommandLine(void)
|
||||
{ "--start-group", 0, CmdlOptStartGroup },
|
||||
{ "--target", 1, CmdlOptTarget },
|
||||
{ "--version", 0, OptVersion },
|
||||
{ "--warnings-as-errors", 0, OptWarningsAsErrors },
|
||||
};
|
||||
|
||||
unsigned I;
|
||||
@@ -845,6 +855,10 @@ int main (int argc, char* argv [])
|
||||
(MemoryAreaOverflows > 1) ? 's' : ' ');
|
||||
}
|
||||
|
||||
if (WarningCount > 0 && WarningsAsErrors) {
|
||||
Error("Warnings as errors");
|
||||
}
|
||||
|
||||
/* Create the output file */
|
||||
CfgWriteTarget ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user