host_integerp vs [] decls

Richard Henderson rth@redhat.com
Fri Sep 14 14:41:00 GMT 2001


On Fri, Sep 14, 2001 at 03:54:07PM -0400, DJ Delorie wrote:
> void test() {
>   int a[][0] = {{1}};
> }
[...]
> #1  0x811873c in store_constructor (...)
>     at /uberbuild/src/gcc/expr.c:4714

Yep, we've forgotten that [] arrays have no MAX_VALUE in the array.

Should be something like

      int const_bounds_p = (TYPE_MIN_VALUE (domain) && TYPE_MAX_VALUE (domain)
			    && host_integerp (TYPE_MIN_VALUE (domain), 0)
                            && host_integerp (TYPE_MAX_VALUE (domain), 0));


r~



More information about the Gcc mailing list