This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Write dependency information (-M*) even if there are errors
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Boris Kolpackov <boris at codesynthesis dot com>, <gcc at gcc dot gnu dot org>
- Date: Wed, 9 Aug 2017 17:06:35 +0000
- Subject: Re: [PATCH] Write dependency information (-M*) even if there are errors
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <email@example.com>
On Wed, 9 Aug 2017, Jeff Law wrote:
> This directly reverts part of Joseph's changes from 2009. I'd like to
> hear from him on this change.
The point of those changes was to make cpplib diagnostics use the
compiler's diagnostic machinery rather than a separate set of diagnostic
machinery in cpplib. The description, regarding dependency information
generation, in the original patch description
<https://gcc.gnu.org/ml/gcc-patches/2009-02/msg00491.html>, is "the code
in cpplib that checked for errors before deciding whether to write
dependency output no longer does so (instead, the compiler has the same
check, but this time based on whether there were any errors at all,
whether compiler or preprocessor)".
That is, that patch wasn't meant to make any change to how errors affect
dependency generation beyond causing compiler errors to be handled the
same as preprocessor errors.
I suppose a question for the present proposal would be making sure any
dependencies generated in this case do not include dependencies on files
that don't exist (so #include "some-misspelling.h" doesn't create any sort
of dependency on such a header).
Joseph S. Myers