This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: reorganize layout of RECORD_TYPEs
- To: aj at suse dot de, gcc-patches at gnu dot org, mark at codesourcery dot com
- Subject: Re: PATCH: reorganize layout of RECORD_TYPEs
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Mon, 13 Mar 2000 11:12:38 -0500 (EST)
> From: Andreas Jaeger <aj@suse.de>
>
> Hi Mark,
>
> with your patch I get a build failure:
> ../../egcs/gcc/stor-layout.c: In function `new_record_layout_info':
> ../../egcs/gcc/stor-layout.c:425: `rec' undeclared (first use in this function)
> ../../egcs/gcc/stor-layout.c:425: (Each undeclared identifier is reported only once
> ../../egcs/gcc/stor-layout.c:425: for each function it appears in.)
>
> A patch is appended - please double check that this is really correct.
>
> Andreas
>
> 2000-03-13 Andreas Jaeger <aj@suse.de>
>
> * stor-layout.c (new_record_layout_info): Fix last patch.
>
> Index: gcc/stor-layout.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/stor-layout.c,v
> retrieving revision 1.54
> diff -u -p -r1.54 stor-layout.c
> --- stor-layout.c 2000/03/13 09:12:50 1.54
> +++ stor-layout.c 2000/03/13 14:30:31
> @@ -422,7 +422,7 @@ new_record_layout_info (t)
>
> #ifdef STRUCTURE_SIZE_BOUNDARY
> /* Packed structures don't need to have minimum size. */
> - if (! TYPE_PACKED (rec))
> + if (! TYPE_PACKED (t))
> rli->record_align = MAX (rli->record_align, STRUCTURE_SIZE_BOUNDARY);
> #endif
>
>
> --
> Andreas Jaeger
I needed slightly more on AIX41:
--- ../cvs-egcs/egcs/gcc/stor-layout.c Mon Mar 13 08:02:30 2000
+++ egcs-CVS20000313/gcc/stor-layout.c Mon Mar 13 10:59:42 2000
@@ -422,7 +422,7 @@ new_record_layout_info (t)
#ifdef STRUCTURE_SIZE_BOUNDARY
/* Packed structures don't need to have minimum size. */
- if (! TYPE_PACKED (rec))
+ if (! TYPE_PACKED (t))
rli->record_align = MAX (rli->record_align, STRUCTURE_SIZE_BOUNDARY);
#endif
@@ -688,7 +688,7 @@ finalize_record_size (rli)
/* Determine the desired alignment. */
#ifdef ROUND_TYPE_ALIGN
TYPE_ALIGN (rli->t) = ROUND_TYPE_ALIGN (rli->t, TYPE_ALIGN (rli->t),
- record_align);
+ rli->record_align);
#else
TYPE_ALIGN (rli->t) = MAX (TYPE_ALIGN (rli->t), rli->record_align);
#endif