pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
authorJason Merrill <jason@redhat.com>
Mon, 18 Feb 2002 03:15:44 +0000 (22:15 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 18 Feb 2002 03:15:44 +0000 (22:15 -0500)
        * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
        (do_decl_instantiation): Likewise.

From-SVN: r49832

gcc/cp/ChangeLog
gcc/cp/pt.c

index 9fd36c950a61cf4d447ecfe125b98dabe38fc906..587ce8e70270dd8a041718de5079d808d24e2841 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-18  Jason Merrill  <jason@redhat.com>
+
+       * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
+       (do_decl_instantiation): Likewise.
+
 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
 
        PR c++/5685
index d963a79cf226e5ce2e61afd0837393ae23b8ddf6..4a57dd39d7a7590d9b38f4c05d62882127ea80c9 100644 (file)
@@ -9502,7 +9502,7 @@ do_decl_instantiation (declspecs, declarator, storage)
     ;
   else if (storage == ridpointers[(int) RID_EXTERN])
     {
-      if (pedantic)
+      if (pedantic && !in_system_header)
        pedwarn ("ISO C++ forbids the use of `extern' on explicit instantiations");
       extern_p = 1;
     }
@@ -9573,7 +9573,7 @@ do_type_instantiation (t, storage, complain)
 
   if (storage != NULL_TREE)
     {
-      if (pedantic)
+      if (pedantic && !in_system_header)
        pedwarn("ISO C++ forbids the use of `%s' on explicit instantiations", 
                   IDENTIFIER_POINTER (storage));