This is the mail archive of the
mailing list for the GCC project.
Re: V3 PATCH: Insert `typename' and `ios_base::' where required
Mark Mitchell <firstname.lastname@example.org> writes:
| >>>>> "Gabriel" == Gabriel Dos Reis <email@example.com> writes:
| Gabriel> Because that file *is included* by a system header.
| ostream includes std_ostream.h includes ostream.tcc, but none of those
| have the #pragma. So, I guess you're saying that we use -isystem to
| include them, which makes sense.
I've just realized that contrary to files include/c_std/**/*.h and
include/c_shadow/**/*.h, the files include/bits/*.h don't active the
system_header #pragma. I thought they were. That is a mistake.
We should activate that pragma, and for maintainers we'll toggle
-Wsystem-headers if desirable.
| Gabriel> When Zack and I discussed the idea of that #pragma a
| Gabriel> while ago, it was the intent that the pragma should apply
| Gabriel> to the transitive closure.
| Maybe the problem is that during instantiation we lose the fact that
| we are in a system header?
| Perhaps this:
| if (warningp
| && (inhibit_warnings
| || (in_system_header && !warn_system_headers)))
| return 0;
| should include
| || (current_function_decl
| && DECL_IN_SYSTEM_HEADER (current_function_decl))
| ? And then make sure that DECL_IN_SYSTEM_HEADER gets set for
| instantiations if it is set for declarations?
That suggestion sounds very good to me.
CodeSourcery, LLC http://www.codesourcery.com