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]

Re: Add checks for tree.value, tree.minval, and tree.maxval andothers


On Fri, 2004-03-26 at 10:56, Richard Kenner wrote:
>     Like this?
> 
> Yup.
>
OK, thanks.  Bootstrapped/tested on x86-64.  Committed to mainline.


Diego.


	* c-typeck.c (comptypes): Replace calls to TYPE_DOMAIN
	  with TYPE_ORIG_SIZE_TYPE.

Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.296
diff -d -c -p -r1.296 c-typeck.c
*** c-typeck.c	26 Mar 2004 11:45:19 -0000	1.296
--- c-typeck.c	26 Mar 2004 16:08:38 -0000
*************** comptypes (tree type1, tree type2, int f
*** 464,475 ****
    /* If either type is the internal version of sizetype, return the
       language version.  */
    if (TREE_CODE (t1) == INTEGER_TYPE && TYPE_IS_SIZETYPE (t1)
!       && TYPE_DOMAIN (t1) != 0)
!     t1 = TYPE_DOMAIN (t1);
  
    if (TREE_CODE (t2) == INTEGER_TYPE && TYPE_IS_SIZETYPE (t2)
!       && TYPE_DOMAIN (t2) != 0)
!     t2 = TYPE_DOMAIN (t2);
  
    /* Enumerated types are compatible with integer types, but this is
       not transitive: two enumerated types in the same translation unit
--- 464,476 ----
    /* If either type is the internal version of sizetype, return the
       language version.  */
    if (TREE_CODE (t1) == INTEGER_TYPE && TYPE_IS_SIZETYPE (t1)
!       && TYPE_ORIG_SIZE_TYPE (t1))
!     t1 = TYPE_ORIG_SIZE_TYPE (t1);
  
    if (TREE_CODE (t2) == INTEGER_TYPE && TYPE_IS_SIZETYPE (t2)
!       && TYPE_ORIG_SIZE_TYPE (t2))
!     t2 = TYPE_ORIG_SIZE_TYPE (t2);
! 
  
    /* Enumerated types are compatible with integer types, but this is
       not transitive: two enumerated types in the same translation unit



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