------- Comment #6 from tromey at gcc dot gnu dot org 2008-05-09 23:02 ------- I think we should give an error by default, and only *not* give an error if -MG is passed. My reasoning is that -MG exists only to disable this error. I couldn't think of a reason to disable it in other cases. For instance, it seems to me that "gcc -E" should fail if a header is missing.
I looked at open_file_failed, but I don't understand the reasoning behind a lot of the logic in there (though see PR 15220). A comment says: /* If we are outputting dependencies but not for this file then don't error because we can still produce correct output. */ ... but this seems to be based on incorrect logic to me. A <> include may define something which affects later inclusions. I wonder if anybody relies on the current, bogus, behavior. -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435