Patchwork {patch implicit-zee.c]: Fix printf-formatter use for long-long type for windows native targets.

login
register
mail settings
Submitter Kai Tietz
Date Dec. 9, 2011, 8:52 a.m.
Message ID <CAEwic4Y4Z8=uFZw+6uYZ_TWXN1wVJhYC9YwJGMAAEDpLb=bcsA@mail.gmail.com>
Download mbox | patch
Permalink /patch/130322/
State New
Headers show

Comments

Kai Tietz - Dec. 9, 2011, 8:52 a.m.
Hi,

this patch fixes for windows native target print-formatter used about
long-long type.

ChangeLog

2011-12-09  Kai Tietz  <ktietz@redhat.com>

	* implicit-zee.c (find_and_remove_ze): Use
	HOST_WIDEST_INT_PRINT_DEC instead of %lld.

Tested for i686-w64-mingw32, x86_64-w64-mingw32, and
x86_64-unknown-linux-gnu.  Ok for apply?

Kai
Richard Guenther - Dec. 9, 2011, 9:49 a.m.
On Fri, Dec 9, 2011 at 9:52 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hi,
>
> this patch fixes for windows native target print-formatter used about
> long-long type.
>
> ChangeLog
>
> 2011-12-09  Kai Tietz  <ktietz@redhat.com>
>
>        * implicit-zee.c (find_and_remove_ze): Use
>        HOST_WIDEST_INT_PRINT_DEC instead of %lld.
>
> Tested for i686-w64-mingw32, x86_64-w64-mingw32, and
> x86_64-unknown-linux-gnu.  Ok for apply?

Just change num_realized and num_ze_opportunities to
type long.

Richard.

> Kai
>
> Index: implicit-zee.c
> ===================================================================
> --- implicit-zee.c      (revision 182092)
> +++ implicit-zee.c      (working copy)
> @@ -944,10 +944,12 @@
>   VEC_free (rtx, heap, zeinsn_del_list);
>
>   if (dump_file && num_ze_opportunities > 0)
> -    fprintf (dump_file, "\n %s : num_zee_opportunities = %lld "
> -                        "num_realized = %lld \n",
> +    fprintf (dump_file, "\n %s : num_zee_opportunities = "
> +                       HOST_WIDEST_INT_PRINT_DEC
> +                        " num_realized = " HOST_WIDEST_INT_PRINT_DEC "\n",
>                         current_function_name (),
> -                        num_ze_opportunities, num_realized);
> +                        (HOST_WIDEST_INT) num_ze_opportunities,
> +                        (HOST_WIDEST_INT) num_realized);
>
>   df_finish_pass (false);
>   return 0;

Patch

Index: implicit-zee.c
===================================================================
--- implicit-zee.c      (revision 182092)
+++ implicit-zee.c      (working copy)
@@ -944,10 +944,12 @@ 
   VEC_free (rtx, heap, zeinsn_del_list);

   if (dump_file && num_ze_opportunities > 0)
-    fprintf (dump_file, "\n %s : num_zee_opportunities = %lld "
-                        "num_realized = %lld \n",
+    fprintf (dump_file, "\n %s : num_zee_opportunities = "
+                       HOST_WIDEST_INT_PRINT_DEC
+                        " num_realized = " HOST_WIDEST_INT_PRINT_DEC "\n",
                         current_function_name (),
-                        num_ze_opportunities, num_realized);
+                        (HOST_WIDEST_INT) num_ze_opportunities,
+                        (HOST_WIDEST_INT) num_realized);

   df_finish_pass (false);
   return 0;