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]

Patches for TYPE_SIZE_UNIT()




All

These patches are against the egcs-19980816 snapshot.

1. Patches for gcc/tree.c
==================

 * gcc/tree.c (build_index_type): copy TYPE_SIZE_UNIT
            from sizetype to itype.

*** egcs-19980816-orig/gcc/tree.c Mon Aug 17 20:31:55 1998
 --- egcs-19980816/gcc/tree.c Mon Aug 17 11:58:45 1998
*************** build_index_type (maxval)
*** 4127,4132 ****
 --- 4127,4133 ----
    

    TYPE_MODE (itype) = TYPE_MODE (sizetype);
    TYPE_SIZE (itype) = TYPE_SIZE (sizetype);
+   TYPE_SIZE_UNIT (itype) = TYPE_SIZE_UNIT (sizetype);
    TYPE_ALIGN (itype) = TYPE_ALIGN (sizetype);
    if (TREE_CODE (maxval) == INTEGER_CST)
      {

2. Patches for gcc/c-delc.c
====================

 * gcc/c-decl.c (finish_struct): Also reset TYPE_SIZE_UNIT
            to zero when reseting TYPE_SIZE to zero.

 * gcc/c-decl.c (finish_enum): Likewise
 
 * gcc/c-decl.c (finish_enum): Copy TYPE_SIZE_UNIT from
            enumtype to tem.

*** egcs-19980816-orig/gcc/c-decl.c Mon Aug 17 20:29:10 1998
 --- egcs-19980816/gcc/c-decl.c Mon Aug 17 15:25:27 1998
*************** finish_struct (t, fieldlist, attributes)
*** 5742,5748 ****
    /* If this type was previously laid out as a forward reference,
       make sure we lay it out again.  */
    

!   TYPE_SIZE (t) = 0;
    

    decl_attributes (t, attributes, NULL_TREE);
    

 --- 5742,5748 ----
    /* If this type was previously laid out as a forward reference,
       make sure we lay it out again.  */
    

!   TYPE_SIZE (t) = TYPE_SIZE_UNIT (t) = 0;
    

    decl_attributes (t, attributes, NULL_TREE);
    

*************** finish_enum (enumtype, values, attribute
*** 6184,6190 ****
    else
      TYPE_PRECISION (enumtype) = TYPE_PRECISION (integer_type_node);
    

!   TYPE_SIZE (enumtype) = 0;
    layout_type (enumtype);
    

    if (values != error_mark_node)
 --- 6184,6190 ----
    else
      TYPE_PRECISION (enumtype) = TYPE_PRECISION (integer_type_node);
    

!   TYPE_SIZE (enumtype) = TYPE_SIZE_UNIT (enumtype) = 0;
    layout_type (enumtype);
    

    if (values != error_mark_node)
*************** finish_enum (enumtype, values, attribute
*** 6216,6221 ****
 --- 6216,6222 ----
        TYPE_MIN_VALUE (tem) = TYPE_MIN_VALUE (enumtype);
        TYPE_MAX_VALUE (tem) = TYPE_MAX_VALUE (enumtype);
        TYPE_SIZE (tem) = TYPE_SIZE (enumtype);
+       TYPE_SIZE_UNIT (tem) = TYPE_SIZE_UNIT (enumtype);
        TYPE_MODE (tem) = TYPE_MODE (enumtype);
        TYPE_PRECISION (tem) = TYPE_PRECISION (enumtype);
        TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype);

Graham



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