Wdtor1.C: Declare template in system header with explicit C++ linkage.
authorMark Mitchell <mark@codesourcery.com>
Sun, 10 Apr 2005 22:39:22 +0000 (22:39 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 10 Apr 2005 22:39:22 +0000 (22:39 +0000)
* g++.dg/warn/Wdtor1.C: Declare template in system header with
explicit C++ linkage.

From-SVN: r97955

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wdtor1.C

index 9d3c99f80b200efe34263a24a993484156bcf132..193391190b2305c7f113be7262f66f58e3ae6842 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-10  Mark Mitchell  <mark@codesourcery.com>
+
+       * g++.dg/warn/Wdtor1.C: Declare template in system header with
+       explicit C++ linkage.
+
 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        * gfortran.dg/pr17229.f: Take care of the new obsolescence
index de1c0e7d39c06c5f7889d4591d7416fd3724fbd9..34c8a7edcada3dd8ec980f5ca25b80c71aca7802 100644 (file)
@@ -5,10 +5,14 @@
 # 1 "<command line>"
 # 1 "t.cc"
 # 1 "include/t.h" 1 3 4
+// Declare the template with explicit C++ linkage in case system
+// headers have implicit C linkage.
+extern "C++" {
 template <int> class t
 {
   virtual void f();
 };
+}
 # 2 "t.cc" 2
 
 void f(void)