This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]