cp:
* semantics.c (begin_class_definition): Check we're not inside a
template parm list.
testsuite:
* g++.old-deja/g++.pt/crash65.C: New test.
From-SVN: r39113
+2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
+
+ * semantics.c (begin_class_definition): Check we're not inside a
+ template parm list.
+
2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
begin_class_definition (t)
tree t;
{
+ if (processing_template_parmlist)
+ {
+ cp_error ("definition of `%#T' inside template parameter list", t);
+ return error_mark_node;
+ }
if (t == error_mark_node
|| ! IS_AGGR_TYPE (t))
{
+2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.pt/crash65.C: New test.
+
2001-01-18 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/assembl2.S: New test case.
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 11 Jan 2001 <nathan@codesourcery.com>
+
+// Bug 1506. We ICE'd on a struct definition inside a template parms.
+// This is still not completely fixed, but now issues a diagnostic
+
+// crash test - XFAIL *-*-*
+
+template<class T =
+struct W {}; // ERROR - inside template parms