https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69402
Bug ID: 69402 Summary: Incorrect dependency generation when precompiled headers are used Product: gcc Version: 4.8.5 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hcma at hcma dot info Target Milestone: --- When a file depends on a pre-compiled header, gcc's dependency generation flags (-M*) have a bug as it does not output the .gch file as a dependency despite the documentation stating that it should: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html The same is true for the man page information. For instance, in the compiler version we are using (4.8.5) the documentation reads: -fpch-deps When using precompiled headers, this flag will cause the dependency-output flags to also list the files from the precompiled header's dependencies. If not specified only the precompiled header would be listed and not the files that were used to create it because those files are not consulted when a precompiled header is used. Specifically, the text above says that "If not specified only the precompiled header would be listed". This problem has also been noted by others beyond myself, for instance: https://bugs.openjdk.java.net/browse/JDK-7175914