PR c++/11616
* pt.c (instantiate_pending_templates): Save and restore
input_location.
* g++.dg/template/instantiate5.C: New test.
From-SVN: r73269
+2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/11616
+ * pt.c (instantiate_pending_templates): Save and restore
+ input_location.
+
2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/2019
tree last = NULL_TREE;
int instantiated_something = 0;
int reconsider;
+ location_t saved_loc = input_location;
do
{
}
while (reconsider);
+ input_location = saved_loc;
return instantiated_something;
}
+2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/11616
+ * g++.dg/template/instantiate5.C: New test.
+
2003-11-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/12726
--- /dev/null
+// { dg-do compile }
+
+// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
+
+// PR c++/11616: Incorrect line number in diagnostics
+
+template <int> struct A
+{
+ static const int i=0;
+};
+
+int baz() { return A<0>::i; }
+
+struct B
+{
+ static void foo (int); // { dg-error "candidates" }
+};
+
+template <typename T> struct C
+{
+ virtual void bar() const { T::foo(); } // { dg-error "no matching function" }
+};
+
+C<B> c; // { dg-error "instantiated" }