+2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/36655
+ * pt.c (do_type_instantiation): In c++0x mode do not warn for
+ extern template.
+
2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
if (storage != NULL_TREE)
{
if (pedantic && !in_system_header)
- pedwarn("ISO C++ forbids the use of %qE on explicit instantiations",
- storage);
+ {
+ if (storage == ridpointers[(int) RID_EXTERN])
+ {
+ if (cxx_dialect == cxx98)
+ pedwarn("ISO C++ 1998 forbids the use of %<extern%> on "
+ "explicit instantiations");
+ }
+ else
+ pedwarn("ISO C++ forbids the use of %qE on explicit "
+ "instantiations", storage);
+ }
if (storage == ridpointers[(int) RID_INLINE])
nomem_p = 1;
+2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/36655
+ * g++.dg/cpp0x/extern_template-2.C: New.
+ * g++.dg/cpp0x/extern_template.C: Rename to...
+ * g++.dg/cpp0x/extern_template-1.C: ... this.
+
2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/36341
--- /dev/null
+// { dg-options "-std=c++0x -pedantic" }
+
+template <typename> void f() {}
+extern template void f<int>();
--- /dev/null
+// { dg-options "-std=c++0x -pedantic" }
+
+template <typename> class S {};
+extern template class S<int>;
+++ /dev/null
-// { dg-options "-std=c++0x -pedantic" }
-
-template <typename> void f() {}
-extern template void f<int>();