Index: gcc/cp/ChangeLog from Alexandre Oliva * parse.y (apparent_template_type): new type (named_complex_class_head_sans_basetype): use it * Makefile.in (CONFLICTS): one new conflict * parse.c: Regenerated Index: gcc/cp/parse.y =================================================================== RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/parse.y,v retrieving revision 1.99 diff -u -r1.99 parse.y --- gcc/cp/parse.y 1998/10/26 02:07:44 1.99 +++ gcc/cp/parse.y 1998/10/31 07:18:22 @@ -253,6 +253,7 @@ %type template_header template_parm_list template_parm %type template_type_parm template_template_parm %type template_close_bracket +%type apparent_template_type %type template_type template_arg_list template_arg_list_opt %type template_arg %type condition xcond paren_cond_or_null @@ -908,6 +909,15 @@ | self_template_type ; +apparent_template_type: + template_type + | identifier '<' template_arg_list_opt '>' + .finish_template_type + { + cp_error ("template class %T was not declared yet", $1); + $$ = $5; + } + self_template_type: SELFNAME '<' template_arg_list_opt template_close_bracket .finish_template_type @@ -2197,9 +2207,9 @@ current_aggr = $1; $$ = handle_class_head ($1, NULL_TREE, $3); } - | aggr template_type + | aggr apparent_template_type { current_aggr = $$; $$ = $2; } - | aggr nested_name_specifier template_type + | aggr nested_name_specifier apparent_template_type { current_aggr = $$; $$ = $3; } ; Index: gcc/cp/Makefile.in =================================================================== RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/Makefile.in,v retrieving revision 1.40 diff -u -r1.40 Makefile.in --- gcc/cp/Makefile.in 1998/10/28 22:26:24 1.40 +++ gcc/cp/Makefile.in 1998/10/31 07:18:22 @@ -218,7 +218,7 @@ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \ `echo $(PARSE_C) | sed 's,^\./,,'` -CONFLICTS = expect 35 shift/reduce conflicts and 42 reduce/reduce conflicts. +CONFLICTS = expect 36 shift/reduce conflicts and 42 reduce/reduce conflicts. $(PARSE_H) : $(PARSE_C) $(PARSE_C) : $(srcdir)/parse.y @echo $(CONFLICTS)