This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 5041, zero-length arrays initialized by []; cause gcc-3.0 to segfault
On Fri, Dec 07, 2001 at 03:49:46PM -0500, DJ Delorie wrote:
>
> > There are two issues here:
> > (1) Is this patch OK to merge to branch?
>
> The zero-length array extension is only supposed to be deprecated in
> 3.0, not removed. The patches I submitted, of which this is one,
> removes it. That's why *I* didn't put them on the branch, at least.
Are you sure it removes it? Your ChangeLog doesn't give
that impression:
2001-09-20 DJ Delorie <dj@redhat.com>
* c-typeck.c (really_start_incremental_init): Discriminate
between zero-length arrays and flexible arrays.
(push_init_level): Detect zero-length arrays and handle them> like fixed-sized arrays.
* expr.c (store_constructor): Handle zero-length arrays and
flexible arrays correctly.
* doc/extend.texi: Update zero-length array notes.
Also, when I apply your patch against gcc 3.0 branch,
it successfully compiles the problem testcase.
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net