This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Compiling GCC with a C++ compiler (2/n)


This changes the use of keyword "template" to the name "template_decl"
in cp/call.c.


Bootstrapped and regtested on an i686-pc-linux-gnu.

-- Gaby

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
retrieving revision 1.4253
diff -p -r1.4253 ChangeLog
*** ChangeLog	29 Jul 2004 17:59:24 -0000	1.4253
--- ChangeLog	1 Aug 2004 18:06:41 -0000
***************
*** 1,3 ****
--- 1,9 ----
+ 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+ 
+ 	* call.c (z_candidate::template_decl): Rename from template.
+ 	(add_template_candidate_real): Adjust member reference.
+ 	(joust): Likewise.
+ 
  2004-07-29  Mark Mitchell  <mark@codesourcery.com>
  
  	* cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
Index: call.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/call.c,v
retrieving revision 1.495
diff -p -r1.495 call.c
*** call.c	18 Jul 2004 05:44:17 -0000	1.495
--- call.c	1 Aug 2004 18:06:44 -0000
*************** struct z_candidate {
*** 424,430 ****
       the `this' pointer must correspond to the most derived class
       indicated by the CONVERSION_PATH.  */
    tree conversion_path;
!   tree template;
    candidate_warning *warnings;
    z_candidate *next;
  };
--- 424,430 ----
       the `this' pointer must correspond to the most derived class
       indicated by the CONVERSION_PATH.  */
    tree conversion_path;
!   tree template_decl;
    candidate_warning *warnings;
    z_candidate *next;
  };
*************** add_template_candidate_real (struct z_ca
*** 2262,2270 ****
         for this will point at template <class T> template <> S<T>::f(int),
         so that we can find the definition.  For the purposes of
         overload resolution, however, we want the original TMPL.  */
!     cand->template = tree_cons (tmpl, targs, NULL_TREE);
    else
!     cand->template = DECL_TEMPLATE_INFO (fn);
  
    return cand;
  }
--- 2262,2270 ----
         for this will point at template <class T> template <> S<T>::f(int),
         so that we can find the definition.  For the purposes of
         overload resolution, however, we want the original TMPL.  */
!     cand->template_decl = tree_cons (tmpl, targs, NULL_TREE);
    else
!     cand->template_decl = DECL_TEMPLATE_INFO (fn);
  
    return cand;
  }
*************** joust (struct z_candidate *cand1, struct
*** 6023,6031 ****
       F1 is a non-template function and F2 is a template function
       specialization.  */
           
!   if (! cand1->template && cand2->template)
      return 1;
!   else if (cand1->template && ! cand2->template)
      return -1;
    
    /* or, if not that,
--- 6023,6031 ----
       F1 is a non-template function and F2 is a template function
       specialization.  */
           
!   if (!cand1->template_decl && cand2->template_decl)
      return 1;
!   else if (cand1->template_decl && !cand2->template_decl)
      return -1;
    
    /* or, if not that,
*************** joust (struct z_candidate *cand1, struct
*** 6033,6042 ****
       more specialized than the template for F2 according to the partial
       ordering rules.  */
    
!   if (cand1->template && cand2->template)
      {
        winner = more_specialized
!         (TI_TEMPLATE (cand1->template), TI_TEMPLATE (cand2->template),
           DEDUCE_ORDER,
           /* Tell the deduction code how many real function arguments
  	    we saw, not counting the implicit 'this' argument.  But,
--- 6033,6043 ----
       more specialized than the template for F2 according to the partial
       ordering rules.  */
    
!   if (cand1->template_decl && cand2->template_decl)
      {
        winner = more_specialized
!         (TI_TEMPLATE (cand1->template_decl),
!          TI_TEMPLATE (cand2->template_decl),
           DEDUCE_ORDER,
           /* Tell the deduction code how many real function arguments
  	    we saw, not counting the implicit 'this' argument.  But,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]