This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix problem in fold_binary
- From: Ian Lance Taylor <iant at google dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 30 Nov 2006 07:46:36 -0800
- Subject: Re: [PATCH] Fix problem in fold_binary
- References: <200611051136.21069.ebotcazou@adacore.com>
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