2009-06-02 Simon Martin <simartin@users.sourceforge.net>
PR c++/38089
* pt.c (register_specialization): Properly setup DECL_CONTEXT for
specializations in an invalid namespace.
gcc/testsuite/
2009-06-02 Simon Martin <simartin@users.sourceforge.net>
PR c++/38089
* g++.dg/template/spec36.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148069
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-06-02 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/38089
+ * pt.c (register_specialization): Properly setup DECL_CONTEXT for
+ specializations in an invalid namespace.
+
2009-06-01 Aldy Hernandez <aldyh@redhat.com>
* error.c (print_instantiation_partial_context): Print column
template it is specializing. */
if (DECL_TEMPLATE_SPECIALIZATION (spec)
&& !check_specialization_namespace (tmpl))
- DECL_CONTEXT (spec) = FROB_CONTEXT (decl_namespace_context (tmpl));
+ DECL_CONTEXT (spec) = DECL_CONTEXT (tmpl);
if (!optimize_specialization_lookup_p (tmpl))
DECL_TEMPLATE_SPECIALIZATIONS (tmpl)
+2009-06-02 Simon Martin <simartin@users.sourceforge.net>
+
+ PR c++/38089
+ * g++.dg/template/spec36.C: New test.
+
2009-06-01 Ian Lance Taylor <iant@google.com>
* gcc.dg/cast-qual-3.c: New testcase.
--- /dev/null
+/* PR c++/38089 */
+/* { dg-do "compile" } */
+
+struct basic_string
+{
+ basic_string(const int __s);
+};
+namespace MyNS {
+ class MyClass {
+ template <typename T>
+ T test() { } /* { dg-error "from definition" } */
+ };
+}
+template <>
+basic_string MyNS::MyClass::test() /* { dg-error "specialization of" } */
+{ return 1; }