* parse.y (template_parm_header, template_spec_header): New
reductions. Split out from ...
(template_header): ... here. Use them.
(template_template_parm): Use template_parm_header.
* semantics.c (finish_template_template_parm): Add assert.
testsuite:
* g++.old-deja/g++.pt/crash63.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38900
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
+
+ * parse.y (template_parm_header, template_spec_header): New
+ reductions. Split out from ...
+ (template_header): ... here. Use them.
+ (template_template_parm): Use template_parm_header.
+ * semantics.c (finish_template_template_parm): Add assert.
+
2001-01-10 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_builtin_type): Fix thinko.
%type <ttype> maybe_parmlist
%type <ttype> member_init
%type <ftype> member_init_list
-%type <ttype> template_header template_parm_list template_parm
+%type <ttype> template_parm_header template_spec_header template_header
+%type <ttype> template_parm_list template_parm
%type <ttype> template_type_parm template_template_parm
%type <code> template_close_bracket
%type <ttype> apparent_template_type
pop_lang_context (); push_lang_context ($2); }
;
-template_header:
+template_parm_header:
TEMPLATE '<'
{ begin_template_parm_list (); }
template_parm_list '>'
{ $$ = end_template_parm_list ($4); }
- | TEMPLATE '<' '>'
+ ;
+
+template_spec_header:
+ TEMPLATE '<' '>'
{ begin_specialization();
$$ = NULL_TREE; }
;
+template_header:
+ template_parm_header
+ | template_spec_header
+ ;
+
template_parm_list:
template_parm
{ $$ = process_template_parm (NULL_TREE, $1); }
;
template_template_parm:
- template_header aggr maybe_identifier
+ template_parm_header aggr maybe_identifier
{ $$ = finish_template_template_parm ($2, $3); }
;
DECL_ARTIFICIAL (decl) = 1;
end_template_decl ();
+ my_friendly_assert (DECL_TEMPLATE_PARMS (tmpl), 20010110);
+
return finish_template_type_parm (aggr, tmpl);
}
+2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.pt/crash63.C: New test.
+
2001-01-11 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/if-2.c: Add wide char test without sign extension.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
- * g++.old_deja/g++.pt/error3.C: New test.
+ * g++.old-deja/g++.pt/error3.C: New test.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
- * g++.old_deja/g++.other/crash39.C: New test.
+ * g++.old-deja/g++.other/crash39.C: New test.
2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
- * g++.old_deja/g++.other/vbase4.C: New test.
+ * g++.old-deja/g++.other/vbase4.C: New test.
2001-01-08 Jonathan Larmour <jlarmour@redhat.com>
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 10 Jan 2001 <nathan@codesourcery.com>
+
+// Bug 1585. We ICEd on a template template parm with no parms.
+
+template<template<class> class C> class B;
+template<template<> class C> class D; // ERROR - parse error