> Echoing Tom's question: given that last 2011 commit for improved macro > diagnostics which appears to assume a diagnostic->location, is it > reasonable to expect every call to diagnostic_report_current_function > call to have the right filename for diagnostic->location for the lang > hook?
Not only that, but I predict that if there are cases where input_filename is different from the filename implied by diagnostic->location, then the output will be wrong, because the filename reported before the prefix "warning:", "error:" and others is taken from diagnostic->location. So the filename given by diagnostic_report_current_function will be different than the one reported in the prefix. I don't think the testsuite currently checks this, but you could add an assert, bootstrap and run the testsuite and see if it breaks. My guess is that if it breaks, it will turn out to be a bug. Cheers, Manuel.