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: Unreviewed patch (expand_expr:MINUS_EXPR)


On Mon, Sep 16, 2002 at 05:06:35PM -0700, Geoff Keating wrote:
> 2. I don't understand Jason's original patch.  If you negate something
>    in a POINTER_TYPE, it should be what you'd expect: the value which,
>    when added to another POINTER_TYPE value, is equivalent to
>    subtracting the original thing.  If that doesn't happen then negation
>    is broken.

Consider when ptr_mode is SImode and Pmode is DImode.  If you do the
negation in POINTER_TYPE (which is unsigned), you wind up with "x - 4"
turning into "x + 0x00000000fffffffc".


r~


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