gcc/gcc cp/cp-tree.h cp/init.c cp/mangle.c cp/ ...

mmitchel@gcc.gnu.org mmitchel@gcc.gnu.org
Sun Oct 16 19:39:00 GMT 2005


CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-10-16 19:38:57

Modified files:
	gcc/cp         : cp-tree.h init.c mangle.c parser.c pt.c 
	                 semantics.c tree.c typeck.c ChangeLog 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: template18.C 
	gcc/testsuite/g++.dg/template: nontype15.C 

Log message:
	PR c++/22137
	* cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
	(check_template_keyword): New function.
	(finish_id_expression): Change prototoype.
	(finish_qualified_id_expr): Change prototype.
	(build_qualified_name): New function.
	(finish_class_member_access_expr): Change prototype.
	* init.c (build_offset_ref): Use build_qualified_name.
	* mangle.c (write_expression): Likewise.
	* parser.c (cp_parser_primary_expression): Remove qualifying_class
	parameter.  Add address_p and template_arg_p.  Use
	build_qualified_name.
	(cp_parser_id_expression): Default *template_p to
	template_keyword_p.  Check for invalid uses of the template
	keyword.
	(cp_parser_postfix_expression): Eliminate special handling for
	qualified names.  Adjust call to cp_parser_primary_expression.
	(cp_parser_postfix_dot_deref_expression): Adjust call to
	cp_parser_id_expression and finish_class_member_access_expr.
	(cp_parser_template_argument_list): Add comment.
	(cp_parser_template_argument): Adjust use of
	cp_parser_primary_expression.  Remove call to
	finish_qualified_id_expr.
	(cp_parser_lookup_name): Use build_qualified_name.
	* pt.c (tsubst): Use build_qualified_name.
	(tsubst_qualified_id): Likewise.  Adjust call to
	finish_qualified_id_expr.
	(tsubst_copy): Use build_qualified_name.
	(tsubst_copy_and_build): Adjusts call to finish_id_expression and
	finish_class_member_access_expr.
	* semantics.c (finish_non_static_data_member): Use
	build_qualified_name.
	(finish_qualified_id_expr): Add template_p and template_arg_p
	parameters.
	(finish_id_expression): Remove qualifiying_class parameter.  Add
	template_p, done, address_p, and template_arg_p.  Use
	build_qualified_name.  Adjust calls to
	finish_class_member_acess_expr.
	* tree.c (build_qualified_name): New function.
	* typeck.c (check_template_keyword): New function.
	(finish_class_member_access_expr): Add template_p argument.  Check
	for invalid uses of the template keyword.
	
	PR c++/22137
	* g++.dg/parse/template18.C: New test.
	* g++.dg/template/nontype15.C: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1166&r2=1.1167
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.431&r2=1.432
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/mangle.c.diff?cvsroot=gcc&r1=1.128&r2=1.129
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.364&r2=1.365
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.1047&r2=1.1048
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.492&r2=1.493
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.443&r2=1.444
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.656&r2=1.657
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4934&r2=1.4935
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template18.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nontype15.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6197&r2=1.6198



More information about the Gcc-cvs mailing list