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]

Re: [C++ PATCH] Fix bug 1639


Jason Merrill wrote:
> If you're going to modify a citation, please be precise about it.  The
> correct phrasing is "pointer or enumeration type".  The term "enumeral
> type" never appears in the standard.

that was very remiss of me, my appologies

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>

	* call.c (add_builtin_candidate): Quote std properly.

Index: cp/call.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/call.c,v
retrieving revision 1.251
diff -c -3 -p -r1.251 call.c
*** call.c	2001/01/23 10:36:23	1.251
--- call.c	2001/01/24 10:50:52
*************** add_builtin_candidate (candidates, code,
*** 1716,1722 ****
       candidate operator functions of the form112)
  	     ptrdiff_t operator-(T, T);
  
!    16For  every enumeral or pointer type T, there exist candidate operator
       functions of the form
  	     bool    operator<(T, T);
  	     bool    operator>(T, T);
--- 1716,1722 ----
       candidate operator functions of the form112)
  	     ptrdiff_t operator-(T, T);
  
!    16For every pointer or enumeration type T, there exist candidate operator
       functions of the form
  	     bool    operator<(T, T);
  	     bool    operator>(T, T);
*************** joust (cand1, cand2, warn)
*** 5211,5224 ****
    if (winner)
      return winner;
  
!   /* or, if not that, a non-template function is better than a
!      template function.  */
! 
    if (! cand1->template && cand2->template)
      return 1;
    else if (cand1->template && ! cand2->template)
      return -1;
!   else if (cand1->template && cand2->template)
      {
        winner = more_specialized
          (TI_TEMPLATE (cand1->template), TI_TEMPLATE (cand2->template),
--- 5211,5231 ----
    if (winner)
      return winner;
  
!   /* or, if not that,
!      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,
!      F1 and F2 are template functions and the function template for F1 is
!      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),
*************** joust (cand1, cand2, warn)
*** 5230,5237 ****
          return winner;
      }
  
!   /* or, if not that, a non-template user function is better than a
!      builtin.  */
    if (TREE_CODE (cand1->fn) != IDENTIFIER_NODE
        && TREE_CODE (cand2->fn) == IDENTIFIER_NODE)
      return 1;
--- 5237,5251 ----
          return winner;
      }
  
!   /* a non-template user function is better than a builtin.  (Pedantically
!      the builtin which matched the user function should not be added to
!      the overload set, but we spot it here.
!      
!      [over.match.oper]
!      ... the builtin candidates include ...
!      - do not have the same parameter type list as any non-template
!        non-member candidate.  */
!                             
    if (TREE_CODE (cand1->fn) != IDENTIFIER_NODE
        && TREE_CODE (cand2->fn) == IDENTIFIER_NODE)
      return 1;

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