On Mon, 25 Oct 2021, Richard Biener via Gcc-patches wrote: > So it looks like tm_d.h is much more stripped down compared to regular > tm_p.h but also oddly enough config/default-d.c includes tm_d.h > while config/default-c.c explicitely documents itself to not do that.
I think the intent of that comment in default-c.c (which I wrote) was that if a separate tm_c.h is needed, it should use its own headers, disjoint from those used by tm.h. In particular, as noted in the original patch submission <https://gcc.gnu.org/legacy-ml/gcc-patches/2011-04/msg00434.html>, that avoids making macros used only to define hooks visible throughout the compiler. > Is it maybe a bug that tm_d.h includes defaults.h at all? Should It's a bug that it includes defaults.h, and a bug that it includes ${cpu_type}/${cpu_type}.h. Any macros used only to define D hooks should be in completely separate headers that aren't used elsewhere in the compiler. > "d defaults" be in a defaults-d.h instead? If I remove the Yes, and likewise any target-specific overrides of such macros should be in a separate header, not ${cpu_type}/${cpu_type}.h. -- Joseph S. Myers jos...@codesourcery.com