This is the mail archive of the gcc@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: host_integerp vs [] decls


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~


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