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 some undefined behavior spots in gcc sources (PR c/53968)


Jakub Jelinek <jakub@redhat.com> writes:
> --- gcc/simplify-rtx.c.jj	2012-08-10 15:49:20.000000000 +0200
> +++ gcc/simplify-rtx.c	2012-08-13 09:51:43.628508537 +0200
> @@ -66,7 +66,7 @@ static rtx simplify_binary_operation_1 (
>  static rtx
>  neg_const_int (enum machine_mode mode, const_rtx i)
>  {
> -  return gen_int_mode (- INTVAL (i), mode);
> +  return gen_int_mode (-(unsigned HOST_WIDE_INT) INTVAL (i), mode);

Really minor, but UINTVAL would be nicer.

Richard


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