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
This commit is contained in:
parent
7f805b8ffc
commit
522d6614c5
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
12
gcc/testsuite/g++.old-deja/g++.pt/crash65.C
Normal file
12
gcc/testsuite/g++.old-deja/g++.pt/crash65.C
Normal file
@ -0,0 +1,12 @@
|
||||
// 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
|
Loading…
x
Reference in New Issue
Block a user