init.c (build_member_call): Handle template_ids.

* init.c (build_member_call): Handle template_ids.
	* parse.y (primary): Add global_scope template_id.

From-SVN: r19859
This commit is contained in:
Jason Merrill 1998-05-19 02:50:52 +00:00 committed by Jason Merrill
parent 88537ff2d0
commit 72e61a0705
5 changed files with 3540 additions and 3513 deletions

View File

@ -1,5 +1,14 @@
Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
* init.c (build_member_call): Handle template_ids.
* parse.y (primary): Add global_scope template_id.
Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (setup_initp, start_objects, finish_objects): New fns.
(do_dtors, do_ctors): Split out from...
(finish_file): ...here. Support init_priority.
* decl2.c (get_sentry): Use end_temporary_allocation.
Don't declare permanent_obstack.

View File

@ -212,7 +212,7 @@ parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
`echo $(PARSE_C) | sed 's,^\./,,'`
CONFLICTS = expect 20 shift/reduce conflicts and 39 reduce/reduce conflicts.
CONFLICTS = expect 21 shift/reduce conflicts and 39 reduce/reduce conflicts.
$(PARSE_H) : $(PARSE_C)
$(PARSE_C) : $(srcdir)/parse.y
@echo $(CONFLICTS)

View File

@ -1469,6 +1469,13 @@ build_member_call (type, name, parmlist)
int dont_use_this = 0;
tree basetype_path, decl;
if (TREE_CODE (name) == TEMPLATE_ID_EXPR
&& TREE_CODE (type) == NAMESPACE_DECL)
{
my_friendly_assert (is_overloaded_fn (TREE_OPERAND (name, 0)), 980519);
return build_x_function_call (name, parmlist, current_class_ref);
}
if (type == std_node)
return build_x_function_call (do_scoped_id (name, 0), parmlist,
current_class_ref);

File diff suppressed because it is too large Load Diff

View File

@ -1396,6 +1396,8 @@ primary:
$$ = get_typeid (TYPE_MAIN_VARIANT (type)); }
| global_scope IDENTIFIER
{ $$ = do_scoped_id ($2, 1); }
| global_scope template_id
{ $$ = $2; }
| global_scope operator_name
{
got_scope = NULL_TREE;