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

Mark Mitchell mark@codesourcery.com
Fri Feb 16 08:35:00 GMT 2001

>>>>> "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.

    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?

Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

More information about the Libstdc++ mailing list