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]
Other format: [Raw text]

Re: [PATCH] Fix problem in fold_binary


Eric Botcazou <ebotcazou@adacore.com> writes:

> 2006-11-05  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* fold-const.c (fold_binary) <LT_EXPR>: Use the precision of the
> 	type instead of the size of its mode to compute the highest and
> 	lowest possible values.  Still check the size of the mode before
> 	flipping the signedness of the comparison.

This is OK, but:

> +		     /* The sign bit is under the control of the mode.  */
> +		     && width == GET_MODE_BITSIZE (TYPE_MODE (arg1_type))

Can you expand this comment?  If I understand this correctly, which I
may not, I think you are trying to say something like "converting a
type with precision smaller than the mode would require sign
extension."

Thanks.

:REVIEWMAIL:

Ian


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