From: C. M. <pu...@38...> - 2019-01-13 11:38:10
|
Hello, I reviewed the revision at https://repo.or.cz/nasm.git/commitdiff/1df7263ae937ac11abb2c6938b8891745af91ce6 This change seems to be wrong: @@ -1575,10 +1570,6 @@ static void assemble_file(const char *fname, struct strlist *depend_list) preproc->cleanup_pass(); - /* Don't output further messages if we are dead anyway */ - if (terminate_after_phase) - break; - if (global_offset_changed) { switch (pass_type()) { case PASS_OPT: And in the following: +/* Pop the warning status off the warning stack */ +void pop_warnings(void) +{ + struct warning_stack *ws = warning_stack; + + memcpy(warning_state, ws->state, sizeof warning_state); + if (!ws->next) { + /*! + *!warn-stack-empty [on] warning stack empty + *! a [WARNING POP] directive was executed when + *! the warning stack is empty. This is treated + *! as a [WARNING *all] directive. + */ + nasm_warn(WARN_WARN_STACK_EMPTY, "warning stack empty"); + } else { + warning_stack = ws->next; + nasm_free(ws); + } ... It seems that WARN_WARN_STACK_EMPTY is issued depending on the *new* state of warning_state, meaning that warn-stack-empty can only be disabled or enabled from the command line. I think that it'd be more useful to issue the warning before applying the original warning_state content, so that the warning warn-stack-empty could be disabled by the input file without using the command line. Regards, ecm |