Commit 522d6614 by Nathan Sidwell Committed by Nathan Sidwell

semantics.c (begin_class_definition): Check we're not inside a template parm list.

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
parent 7f805b8f
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
BASELINK_P.
......
......@@ -1720,6 +1720,11 @@ tree
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.
......
// 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment