https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125230

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think GCC's rationale is that you explicitly compiled the header into a
header unit. That part wasn't done silently, you did it. If you tell GCC that
a.hpp can be imported as a header unit, it will assume it can be imported as a
header unit. 

Maybe what we need is an option that turns off include translation, either for
the whole file or for specific headers, so you could still compile a.hpp as a
header unit, but compile b.cpp with -fno-include-translation or
-fno-include-translation=a.hpp

Reply via email to