c-decl.c (finish_struct): Detect flexible array members used in an inappropriate...
authorRichard Henderson <rth@redhat.com>
Fri, 5 Jan 2001 05:58:23 +0000 (21:58 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 5 Jan 2001 05:58:23 +0000 (21:58 -0800)
commitffc5c6a98441d8e1abe6cdc0d2a93591e21191d7
treef0375afbbd6220caa4aacf6320495224ac911480
parent00de56c7d0e654b52c23e789dbe3cc32d361a527
c-decl.c (finish_struct): Detect flexible array members used in an inappropriate context.

        * c-decl.c (finish_struct): Detect flexible array members
        used in an inappropriate context.
        * c-typeck.c (really_start_incremental_init): Special case
        constructor_max_index for zero length arrays.
        (pop_init_level): Allow initialization of flexible array
        members.  Deprecate initialization of zero length arrays.
        Don't issue missing initializer warning for flexible array
        members or zero length arrays.
        (process_init_element): Don't dereference null DECL_SIZE.
        * varasm.c (array_size_for_constructor): Return a HOST_WIDE_INT.
        Don't abort for empty constructors.  Use size_binop
        (output_constructor): Add commentary regarding zero length
        array futures.  Abort if we try to initialize an array of
        unspecified length with a non-empty constructor in the middle
        of a structure.

        * extend.texi (Zero Length): Update and clarify documentation
        on static initialization.

From-SVN: r38705
gcc/ChangeLog
gcc/c-decl.c
gcc/c-typeck.c
gcc/extend.texi
gcc/varasm.c