This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 compute_frame_size cleanups
- To: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Subject: Re: i386 compute_frame_size cleanups
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 9 Feb 2000 21:14:34 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <20000209164320.D28644@atrey.karlin.mff.cuni.cz>
On Wed, Feb 09, 2000 at 04:43:20PM +0100, Jan Hubicka wrote:
> Second problem was trigered by following testcase:
>
> x(){int y[]={};}
>
> It forces alignment even when framesize is still 0. My current approach to
> avoid this alignment is to check for this speccase in assign_temp and allocate
> NULL such arrays at NULL pointer, but I am not sure, if this is OK for
> standards.
Well, zero length arrays aren't covered by any standard -- they are a
gcc extension. I still worry about returning NULL though. I think it
would be better to treat this as a single byte allocation. This is not
dissimilar to the treatment C++ gives to empty classes.
With that change, and suitible added commentary, the patch is ok.
r~