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: i386 compute_frame_size cleanups


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~

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