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: ptrmem.C conflict with PSImode pointers


> > So should I change this bit in stor-layout.c:layout_type ?
> 
> >     case OFFSET_TYPE:
> >       TYPE_SIZE (type) = bitsize_int (POINTER_SIZE);
> >       TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE / BITS_PER_UNIT);
> >       TYPE_MODE (type) = ptr_mode;
> >       break;
> 
> Yes, I suppose so.  Though hopefully only the mode should be different.

Like this?

Thu Mar 22 23:26:34 2001  J"orn Rennecke <amylaar@redhat.com>

	* stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type.

Index: stor-layout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stor-layout.c,v
retrieving revision 1.95
diff -p -r1.95 stor-layout.c
*** stor-layout.c	2001/03/03 03:53:43	1.95
--- stor-layout.c	2001/03/22 23:26:30
*************** layout_type (type)
*** 1341,1347 ****
      case OFFSET_TYPE:
        TYPE_SIZE (type) = bitsize_int (POINTER_SIZE);
        TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE / BITS_PER_UNIT);
!       TYPE_MODE (type) = ptr_mode;
        break;
  
      case FUNCTION_TYPE:
--- 1341,1349 ----
      case OFFSET_TYPE:
        TYPE_SIZE (type) = bitsize_int (POINTER_SIZE);
        TYPE_SIZE_UNIT (type) = size_int (POINTER_SIZE / BITS_PER_UNIT);
!       /* A pointer might be MODE_PARTIAL_INT,
! 	 but ptrdiff_t must be integral.  */
!       TYPE_MODE (type) = mode_for_size (POINTER_SIZE, MODE_INT, 0);
        break;
  
      case FUNCTION_TYPE:


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