V3 PATCH: Insert `typename' and `ios_base::' where required

Gabriel Dos Reis gdr@codesourcery.com
Fri Feb 16 08:48:00 GMT 2001

Mark Mitchell <mark@codesourcery.com> writes:

| >>>>> "Gabriel" == Gabriel Dos Reis <gdr@codesourcery.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.

My apologies.

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.


-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com

More information about the Libstdc++ mailing list