This is the mail archive of the gcc-patches@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: Patch to warn about static initializers for zero length arrays


>     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~

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