[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED Target Milestone|4.5.3 |4.5.0 Known to fail|| --- Comment #20 from Andrew Pinski pinskia at gcc dot gnu.org 2012-01-12 20:26:59 UTC --- Fixed so closing.
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|4.5.2 |4.5.3 --- Comment #19 from Richard Guenther rguenth at gcc dot gnu.org 2010-12-16 13:03:23 UTC --- GCC 4.5.2 is being released, adjusting target milestone.
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #18 from rguenth at gcc dot gnu dot org 2010-07-31 09:29 --- GCC 4.5.1 is being released, adjusting target milestone. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|4.5.1 |4.5.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #17 from rguenth at gcc dot gnu dot org 2010-04-06 11:19 --- GCC 4.5.0 is being released. Deferring to 4.5.1. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|4.5.0 |4.5.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #15 from pinskia at gcc dot gnu dot org 2010-02-07 20:33 --- *** Bug 42921 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||rhansen at bbn dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #16 from cgd at google dot com 2010-02-07 21:24 --- (In reply to comment #15) *** Bug 42921 has been marked as a duplicate of this bug. *** 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: [...@laptop tmp]$ echo #include does_not_exist.h foo.c [...@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 [...@laptop tmp]$ echo '#include does_not_exist.h' foo.c [...@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 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #13 from cgd at gcc dot gnu dot org 2009-09-20 08:08 --- Subject: Bug 28435 Author: cgd Date: Sun Sep 20 08:08:06 2009 New Revision: 151894 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=151894 Log: [gcc/testsuite/ChangeLog] 2009-09-20 Chris Demetriou c...@google.com PR preprocessor/28435: * gcc.dg/cpp/missing-header-MD.c: Make output checking match gcc.dg/cpp/missing-header-1.c, and add PR number to test comment. * gcc.dg/cpp/missing-header-MMD.c: Likewise. * gcc.dg/cpp/missing-sysheader-MD.c: Likewise. * gcc.dg/cpp/missing-sysheader-MMD.c: Likewise. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/cpp/missing-header-MD.c trunk/gcc/testsuite/gcc.dg/cpp/missing-header-MMD.c trunk/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MD.c trunk/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MMD.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #14 from cgd at gcc dot gnu dot org 2009-09-20 08:10 --- HJ, I believe I've fixed the tests now: PASS: gcc.dg/cpp/missing-header-MD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-header-MD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-header-MD.c (test for excess errors) PASS: gcc.dg/cpp/missing-header-MMD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-header-MMD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-header-MMD.c (test for excess errors) PASS: gcc.dg/cpp/missing-sysheader-MD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-sysheader-MD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-sysheader-MD.c (test for excess errors) PASS: gcc.dg/cpp/missing-sysheader-MMD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-sysheader-MMD.c (test for warnings, line ) PASS: gcc.dg/cpp/missing-sysheader-MMD.c (test for excess errors) thanks for letting me know. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #7 from cgd at gcc dot gnu dot org 2009-09-19 06:15 --- Subject: Bug 28435 Author: cgd Date: Sat Sep 19 06:15:21 2009 New Revision: 151879 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=151879 Log: [libcpp/ChangeLog] 2009-09-18 Chris Demetriou c...@google.com PR preprocessor/28435: * include/cpplib.h (struct cpp_options): Add new member deps.need_preprocessor_output. * files.c (open_file_failed): If preprocessor output is needed always report an error. [gcc/ChangeLog] 2009-09-19 Chris Demetriou c...@google.com PR preprocessor/28435: * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate to cpplib that the preprocessor output is needed. [gcc/testsuite/ChangeLog] 2009-09-19 Chris Demetriou c...@google.com PR preprocessor/28435: * gcc.dg/cpp/missing-header-MD.c: New test. * gcc.dg/cpp/missing-header-MMD.c: New test. * gcc.dg/cpp/missing-sysheader-MD.c: New test. * gcc.dg/cpp/missing-sysheader-MMD.c: New test. Added: trunk/gcc/testsuite/gcc.dg/cpp/missing-header-MD.c trunk/gcc/testsuite/gcc.dg/cpp/missing-header-MMD.c trunk/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MD.c trunk/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MMD.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-opts.c trunk/gcc/testsuite/ChangeLog trunk/libcpp/ChangeLog trunk/libcpp/files.c trunk/libcpp/include/cpplib.h -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #8 from cgd at gcc dot gnu dot org 2009-09-19 19:26 --- Fixed in trunk in rev 151879. -- cgd at gcc dot gnu dot org changed: What|Removed |Added CC||cgd at gcc dot gnu dot org Status|NEW |RESOLVED Keywords||patch Known to fail||4.2.0 4.2.1 4.2.2 4.3.1 ||4.4.0 Resolution||FIXED Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #10 from hjl dot tools at gmail dot com 2009-09-19 21:47 --- All new tests are failing. -- hjl dot tools at gmail dot com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #11 from cgd at google dot com 2009-09-20 01:34 --- Subject: Re: -MMD vs not found system header (included from a system header) Gack, sorry, looks like I screwed this up. When I retested after updating, I only compared test results before/after, and saw what I was expecting, I didn't actually recheck all of the output from the new tests. I'll see about fixing ASAP. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #12 from cgd at gcc dot gnu dot org 2009-09-20 01:57 --- (In reply to comment #11) Gack, sorry, looks like I screwed this up. When I retested after updating, I only compared test results before/after, and saw what I was expecting, I didn't actually recheck all of the output from the new tests. Actually, it looking at this error further, I can't see how the new tests ever passed in trunk. (I initially wrote this in 4.4.0, where I definitely verified that all of the tests passed... but the 'fatal error' bit was changed in trunk, and so I had to change the tests. And I know that I diffed the test results in trunk, but I can only conclude that I never actually verified that they all passed in trunk. *sigh*) Anyway, testing the fix now (copying the error-checking style from the current missing-header-1 test). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- 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
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #5 from matz at gcc dot gnu dot org 2006-10-18 14:04 --- The problem is in libcpp/files.c:open_file_failed. It deliberately only gives a warning when producing dependencies (and under some circumstances doesn't even give a warning) for missing files. I think it does that under the assumption that the user gave only -M (with -E implied), so he would be interested in the preprocessor output nevertheless, and that can be produced even with missing deps. The problem is, that giving -MD or -MMD does not imply -E, i.e. the user really wants the deps to just be a side-effect, as documented. Probably libcpp needs another option which can be set from the driver, which would make it produce errors instead of warnings. -- matz at gcc dot gnu dot org changed: What|Removed |Added CC||matz at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-10-03 15:55 --- *** Bug 29331 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||gcc-bklyn at sneakemail dot ||com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #4 from pinskia at gcc dot gnu dot org 2006-10-03 15:56 --- Confirmed via the dup bug. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-10-03 15:56:21 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-09-03 20:25 --- This looks like the same bug as PR 22231. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added BugsThisDependsOn||22231 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435
[Bug preprocessor/28435] -MMD vs not found system header (included from a system header)
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-07-19 14:06 --- I forgot to say every GCC since at least 2.95.3, I tried has the same behavior. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28435