PR c++/3882
* pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
(tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
only after recording the declaration.
From-SVN: r50999
+2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
+
+ PR c++/3882
+ * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
+ (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
+ only after recording the declaration.
+
2002-03-18 Jason Merrill <jason@redhat.com>
PR c++/2039
--- /dev/null
+// PR c++/3882
+// Verify that variable initialization can be
+// self-referencing inside a template function.
+
+int foo(int);
+
+template <typename T>
+void bar(const T&)
+{
+ int i = foo(i);
+}
+
+void quus()
+{
+ bar(0);
+}