This commit is contained in:
Dale Weiler 2016-11-24 13:40:22 +00:00
parent 9821b6a075
commit 01f3447e5b

View file

@ -6324,11 +6324,15 @@ bool parser_finish(parser_t *parser, const char *output)
}
parser_remove_ast(parser);
if (compile_Werrors) {
con_out("*** there were warnings treated as errors\n");
compile_show_werrors();
retval = false;
}
auto fnCheckWErrors = [&retval]() {
if (compile_Werrors) {
con_out("*** there were warnings treated as errors\n");
compile_show_werrors();
retval = false;
}
};
fnCheckWErrors();
if (retval) {
if (OPTS_OPTION_BOOL(OPTION_DUMPFIN))
@ -6339,6 +6343,9 @@ bool parser_finish(parser_t *parser, const char *output)
delete ir;
return false;
}
// ir->generate can generate compiler warnings
fnCheckWErrors();
}
delete ir;
return retval;