On 08/06/2017 01:59 AM, Boris Kolpackov wrote:
> Currently GCC does not write extracted header dependency information
> if there are errors. However, this can be useful when dealing with
> outdated generated headers that trigger errors which would have been
> resolved if we could update it. A concrete example in our case is a
> version check with #error.
> The included (trivial) patch changes this behavior. Note also that
> this is how Clang already behaves. I've tested the patch in build2
> and everything works well (i.e., no invalid dependency output in the
> face of various preprocessor errors such as #error, stray #else, etc).
> While I don't foresee any backwards-compatibility issues with such
> an unconditional change (after all, the compiler still exists with
> an error status), if there are concerns, I could re-do it via an
> option (e.g., -ME, analogous to -MG).
> P.S. I have the paperwork necessary to contribute on file with FSF.
This directly reverts part of Joseph's changes from 2009. I'd like to
hear from him on this change.
Author: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun Mar 29 22:56:07 2009 +0000
[ ... ]