OSDN Git Service

* pt.c (do_decl_instantiation): Downgrade duplicate instantiation
[pf3gnuchains/gcc-fork.git] / gcc / cp / pt.c
index 712ad6c..d591c46 100644 (file)
@@ -8952,8 +8952,8 @@ do_decl_instantiation (declspecs, declarator, storage)
 
         No program shall both explicitly instantiate and explicitly
         specialize a template.  */
-      cp_error ("explicit instantiation of `%#D' after", result);
-      cp_error_at ("explicit specialization here", result);
+      cp_pedwarn ("explicit instantiation of `%#D' after", result);
+      cp_pedwarn_at ("explicit specialization here", result);
       return;
     }
   else if (DECL_EXPLICIT_INSTANTIATION (result))
@@ -8967,7 +8967,7 @@ do_decl_instantiation (declspecs, declarator, storage)
         first instantiation was `extern' and the second is not, and
         EXTERN_P for the opposite case.  */
       if (DECL_INTERFACE_KNOWN (result) && !extern_p)
-       cp_error ("duplicate explicit instantiation of `%#D'", result);
+       cp_pedwarn ("duplicate explicit instantiation of `%#D'", result);
 
       /* If we've already instantiated the template, just return now.  */
       if (DECL_INTERFACE_KNOWN (result))