This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Allow compound literals in static storage duration object initializers
On Wed, Dec 12, 2001 at 12:46:31PM -0800, Richard Henderson wrote:
> On Wed, Dec 12, 2001 at 07:00:06PM +0000, Joseph S. Myers wrote:
> > > a) handle it the same way as older gcc, which is kind of surprising
> > > behaviour (this done in patch below)
> > > b) issue an error if compound literal's array type is not unknown
> > > size and the size is different to the size of bracket enclosed
> > > list
> > > c) handle it so that object gets size of the compound literal array type
> > If this extension were intentionally designed, clearly (c) would be
> > appropriate; as it is, as an allowance for old code, (a), though
> > surprising and of an odd design, may be best.
> I don't think old code would have a problem with C. I think you'll
> find that old code primarily uses this extension with structures.
Ok, I'll work on (c) tomorrow.