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: [patch] Promote xImode types to int


On Fri, 14 Sep 2001, Richard Henderson wrote:
> > I'm not sure if just checking whether an INTEGER_TYPE is smaller than
> > an int is sufficient here. Should that be the case I'll simplify and
> > resubmit the patch.
> 
> I would think so.  You still have to check the known types, since
> the boundary condition of sizeof(short) == sizeof(int) is supposed
> to promote, but not sizeof(long) == sizeof(int).

Ok, then this should work. Bootstrapped and regtested on
sparc-sun-solaris2.8.

Bye

Roman

2001-09-15  Roman Lechtchinsky  <rl@cs.tu-berlin.de>

	* c-common.c (c_promoting_integer_type_p): Handle ?Imode types.

Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.250
diff -c -3 -p -r1.250 c-common.c
*** c-common.c	2001/09/12 17:17:48	1.250
--- c-common.c	2001/09/15 18:50:34
*************** c_promoting_integer_type_p (t)
*** 3391,3397 ****
  	      || TYPE_MAIN_VARIANT (t) == signed_char_type_node
  	      || TYPE_MAIN_VARIANT (t) == unsigned_char_type_node
  	      || TYPE_MAIN_VARIANT (t) == short_integer_type_node
! 	      || TYPE_MAIN_VARIANT (t) == short_unsigned_type_node);
  
      case ENUMERAL_TYPE:
        /* ??? Technically all enumerations not larger than an int
--- 3391,3398 ----
  	      || TYPE_MAIN_VARIANT (t) == signed_char_type_node
  	      || TYPE_MAIN_VARIANT (t) == unsigned_char_type_node
  	      || TYPE_MAIN_VARIANT (t) == short_integer_type_node
! 	      || TYPE_MAIN_VARIANT (t) == short_unsigned_type_node
! 	      || TYPE_PRECISION (t) < TYPE_PRECISION (integer_type_node));
  
      case ENUMERAL_TYPE:
        /* ??? Technically all enumerations not larger than an int


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