[Bug preprocessor/42921] No error with missing header and -MM

rhansen at bbn dot com gcc-bugzilla@gcc.gnu.org
Mon Feb 8 05:33:00 GMT 2010



------- Comment #2 from rhansen at bbn dot com  2010-02-08 05:33 -------
Reopening; this is a different issue than bug 28435.

Chris Demetriou in bug 28435, comment 16 says:
> FWIW, I actually think that's a different issue (though certainly related).
>
> this bug was all about -MD and -MMD -- and what happens when an object file 
> needs to be output, but cannot be because of a missing include.
>
> AFAICT, that bug is all about, what should the handling of -MM be vs. 
> missing system headers.
>
> That having been said, I will note that with:
> gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
>
> you get the results:
>
> [cgd@laptop tmp]$ echo "#include <does_not_exist.h>" > foo.c
> [cgd@laptop tmp]$ gcc -MM -MF foo.d foo.c && echo succeeded || echo failed
> foo.c:1:28: does_not_exist.h: No such file or directory
> failed
> [cgd@laptop tmp]$ echo '#include "does_not_exist.h"' > foo.c
> [cgd@laptop tmp]$ gcc -MM -MF foo.d foo.c && echo succeeded || echo failed
> foo.c:1:28: does_not_exist.h: No such file or directory
> failed
>
> So this certainly used to behave as the submitter of 42921 expected at 
> *some* point.
>
> As of 4.2.2 (the next version I have handy after 3.4.4) the first case 
> reported "succeeded" (and the second failed).
>
> --cgd


-- 

rhansen at bbn dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42921



More information about the Gcc-bugs mailing list