This is the mail archive of the gcc@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: m32c: pointer math vs sizetype again


> Does the following fix it?

Nope, sorry.  I was looking at this code in c-common.c, where the expr
is first created, but I don't know what that ends up calling:

  /* Create the sum or difference.  */
  if (resultcode == MINUS_EXPR)
    intop = fold_build1 (NEGATE_EXPR, sizetype, intop);

  ret = fold_build2 (POINTER_PLUS_EXPR, result_type, ptrop, intop);

It's calling NEGATE on an unsigned type, which seems wrong to me.


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