REFERENCE_TYPE

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Mon Apr 10 05:19:00 GMT 2000


A recent change, I think related to builtins, can make these occurs in
the C front end, so I committed the following:

Mon Apr 10 07:21:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.
	* c-typeck.c (convert_for_assignment): Likewise.

*** c-convert.c	2000/03/27 01:26:16	1.7
--- c-convert.c	2000/04/10 11:59:46	1.8
*************** convert (type, expr)
*** 89,93 ****
    if (code == INTEGER_TYPE || code == ENUMERAL_TYPE)
      return fold (convert_to_integer (type, e));
!   if (code == POINTER_TYPE)
      return fold (convert_to_pointer (type, e));
    if (code == REAL_TYPE)
--- 89,93 ----
    if (code == INTEGER_TYPE || code == ENUMERAL_TYPE)
      return fold (convert_to_integer (type, e));
!   if (code == POINTER_TYPE || code == REFERENCE_TYPE)
      return fold (convert_to_pointer (type, e));
    if (code == REAL_TYPE)
*** c-typeck.c	2000/04/08 04:45:17	1.62
--- c-typeck.c	2000/04/10 11:59:46	1.63
*************** convert_for_assignment (type, rhs, errty
*** 4083,4087 ****
  
    /* Conversions among pointers */
!   else if (codel == POINTER_TYPE && coder == POINTER_TYPE)
      {
        register tree ttl = TREE_TYPE (type);
--- 4083,4088 ----
  
    /* Conversions among pointers */
!   else if ((codel == POINTER_TYPE || codel == REFERENCE_TYPE)
! 	   && (coder == POINTER_TYPE || coder == REFERENCE_TYPE))
      {
        register tree ttl = TREE_TYPE (type);


More information about the Gcc-patches mailing list