This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to warn about static initializers for zero length arrays
- To: Will Cohen <wcohen at redhat dot com>
- Subject: Re: Patch to warn about static initializers for zero length arrays
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 18 Sep 2000 10:21:31 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <39C633EC.81E9FDD5@redhat.com>
> prec = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (expr)));
> +
> + /* Shifting by the host word size is undefined according to the ANSI
> + standard, so we must handle this as a special case. */
> + if (prec == HOST_BITS_PER_WIDE_INT)
> + return TREE_INT_CST_LOW (expr) == ~ (unsigned HOST_WIDE_INT) 0;
> +
> if (prec >= HOST_BITS_PER_WIDE_INT)
Why are you adding this bit? Certainly not for the reason
in the comment, as that's already handled below.
r~