Explicit template argument specification patch

Mark Mitchell mmitchell@usa.net
Thu Sep 11 11:05:00 GMT 1997


>>>>> "Mark" == Mark Mitchell <mmitchell@usa.net> writes:

    Mark> Below is a patch that implements explicit arguments for
    Mark> template functions, as described in [ temp.arg.explicit ].
    Mark> No additional tests fail, and even relatively pathological

I've found and fixed the parsing bug.  Here's a patch, to be applied
after the previous patch, that simply undoes a needless and accidental
change in that patch.

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu

Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>

	* parse.y (primary): Undo typo in previous change.  Make PFUNCNAME
	of the same precedence as IDENTIFIER.

Index: parse.y
===================================================================
RCS file: /home/mitchell/Repository/egcs/gcc/cp/parse.y,v
retrieving revision 1.4
diff -c -p -r1.4 parse.y
*** parse.y	1997/09/11 06:24:56	1.4
--- parse.y	1997/09/11 16:43:29
*************** empty_parms ()
*** 165,171 ****
  %nonassoc IF
  %nonassoc ELSE
  
! %left IDENTIFIER TYPENAME SELFNAME PTYPENAME SCSPEC TYPESPEC CV_QUALIFIER ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR NSNAME TYPENAME_KEYWORD
  
  %left '{' ',' ';'
  
--- 165,171 ----
  %nonassoc IF
  %nonassoc ELSE
  
! %left IDENTIFIER PFUNCNAME TYPENAME SELFNAME PTYPENAME SCSPEC TYPESPEC CV_QUALIFIER ENUM AGGR ELLIPSIS TYPEOF SIGOF OPERATOR NSNAME TYPENAME_KEYWORD
  
  %left '{' ',' ';'
  
*************** primary:
*** 1534,1540 ****
  				       NULL_TREE, NULL_TREE);
  		  else
  		    $$ = build_member_call (OP0 ($$), OP1 ($$), NULL_TREE); }
! 	| object notype_unqualified_id  %prec UNARY
  		{ $$ = build_x_component_ref ($$, $2, NULL_TREE, 1); }
          | object object_template_id %prec UNARY
                  { 
--- 1534,1540 ----
  				       NULL_TREE, NULL_TREE);
  		  else
  		    $$ = build_member_call (OP0 ($$), OP1 ($$), NULL_TREE); }
! 	| object unqualified_id  %prec UNARY
  		{ $$ = build_x_component_ref ($$, $2, NULL_TREE, 1); }
          | object object_template_id %prec UNARY



More information about the Gcc mailing list