PR g++/3381
* parse.y (named_complex_class_head_sans_basetype): Add new
reduction.
* Make-lang.in (parse.c): Adjust expected conflict count.
testsuite:
* g++.dg/other/scope1.C: New test.
* g++.dg/template/explicit-instantiation.C: Remove XFAIL
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47546
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR g++/3381
+ * parse.y (named_complex_class_head_sans_basetype): Add new
+ reduction.
+ * Make-lang.in (parse.c): Adjust expected conflict count.
+
2001-12-03 Jason Merrill <jason@redhat.com>
* class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
$(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h
$(srcdir)/cp/parse.h $(srcdir)/cp/parse.c: $(srcdir)/cp/parse.y
- @echo "Expect 33 shift/reduce conflicts and 58 reduce/reduce conflicts."
+ @echo "Expect 36 shift/reduce conflicts and 58 reduce/reduce conflicts."
cd $(srcdir)/cp; $(BISON) $(BISONFLAGS) -d -o p$$$$.c parse.y ; \
grep '^#define[ ]*YYEMPTY' p$$$$.c >> p$$$$.h ; \
mv -f p$$$$.c parse.c ; mv -f p$$$$.h parse.h
push_scope (CP_DECL_CONTEXT ($$.t));
$$.new_type_flag = 1;
}
+ | aggr global_scope nested_name_specifier apparent_template_type
+ {
+ current_aggr = $1;
+ $$.t = $4;
+ push_scope (CP_DECL_CONTEXT ($$.t));
+ $$.new_type_flag = 1;
+ }
;
named_class_head:
+2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.dg/other/scope1.C: New test.
+ * g++.dg/template/explicit-instantiation.C: Remove XFAIL
+
2001-12-03 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc.dg/vla-init-1.c: New test.
--- /dev/null
+// { dg-do compile }
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 30 Nov 2001 <nathan@nathan@codesourcery.com>
+
+// PR 3381
+
+namespace N {
+ template<class T>
+ class A { };
+}
+
+template class N::A<unsigned>; // this works (by itself)
+template class ::N::A<int>; // but this doesn't
// Origin: Jens.Maurer@gmx.net
// { dg-do compile }
+// Fixed: PR 3381
+
namespace N
{
template<class T>
class A { };
}
-template class ::N::A<int>; // { dg-bogus ".*" "" { xfail *-*-* } }
+template class ::N::A<int>;