This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: host_integerp vs [] decls
- To: DJ Delorie <dj at redhat dot com>
- Subject: Re: host_integerp vs [] decls
- From: Richard Henderson <rth at redhat dot com>
- Date: Fri, 14 Sep 2001 14:41:12 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <200109141954.PAA09127@greed.delorie.com>
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~