mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-01 14:30:56 +00:00
Fix #171
This commit is contained in:
parent
9821b6a075
commit
01f3447e5b
1 changed files with 12 additions and 5 deletions
17
parser.cpp
17
parser.cpp
|
@ -6324,11 +6324,15 @@ bool parser_finish(parser_t *parser, const char *output)
|
||||||
}
|
}
|
||||||
parser_remove_ast(parser);
|
parser_remove_ast(parser);
|
||||||
|
|
||||||
if (compile_Werrors) {
|
auto fnCheckWErrors = [&retval]() {
|
||||||
con_out("*** there were warnings treated as errors\n");
|
if (compile_Werrors) {
|
||||||
compile_show_werrors();
|
con_out("*** there were warnings treated as errors\n");
|
||||||
retval = false;
|
compile_show_werrors();
|
||||||
}
|
retval = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
fnCheckWErrors();
|
||||||
|
|
||||||
if (retval) {
|
if (retval) {
|
||||||
if (OPTS_OPTION_BOOL(OPTION_DUMPFIN))
|
if (OPTS_OPTION_BOOL(OPTION_DUMPFIN))
|
||||||
|
@ -6339,6 +6343,9 @@ bool parser_finish(parser_t *parser, const char *output)
|
||||||
delete ir;
|
delete ir;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ir->generate can generate compiler warnings
|
||||||
|
fnCheckWErrors();
|
||||||
}
|
}
|
||||||
delete ir;
|
delete ir;
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Reference in a new issue