touch err.h echo "include \"err.h\" >> err.c echo "include \<stdio.h\> >> err.c echo "int main() {}" >> err.c
gcc -H err.h gcc -H err.c prints: ! x9.h.gch x9.c . /usr/include/stdio.h [more headers...] .. /usr/include/bits/sys_errlist.h Multiple include guards may be useful for: /usr/include/bits/stdio_lim.h gcc err.h gcc -H err.c prints: ! x9.h.gch Multiple include guards may be useful for: /usr/include/bits/stdio_lim.h gcc -H err.h gcc err.c prints: x9.c [more headers...] .. /usr/include/bits/sys_errlist.h [no warning about possibly missing include guard] Leading to the following conclusion: the option, whether the header dependencies should be displayed or not is included in the precompiled header, so processing a pch can turn it either on or off. I don't think, that this behaviour is intended. gcc-4.2.4 gets it imho right, printing all dependencies when -H is used, no matter, if the pch was compiled -H or not. If this kind of behaviour is desired, could someone point out the reason, please? -- Summary: [4.3 Regression] -H option doesn't work as expected Product: gcc Version: 4.2.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: pch AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rbuergel at web dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36649