Hi all,

I'm seeing these warnings when building arm.c:
warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 
has type ‘long int’ [-Wformat=]

These appear in the bounds_check function when it tries to print out 
HOST_WIDE_INTs using the %lld format.
I believe the right way to print these is with %wd, which is what the 
equivalent aarch64 function does.

With this patch I don't see the warnings any more.
Bootstrapped and tested on arm.

Ok for trunk?

Thanks,
Kyrill

2015-08-14  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

    * config/arm/arm.c (bounds_check): Use %wd print format
    for HOST_WIDE_INT arguments.
commit 004a6baac827ae61c6be32f570decff56e987995
Author: Kyrylo Tkachov <kyrylo.tkac...@arm.com>
Date:   Thu Aug 13 14:20:38 2015 +0100

    [ARM] Use %wd format for lane printing in bounds_check

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index a401f70..c9c8d7c 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -12847,10 +12847,10 @@ bounds_check (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high,
   if (lane < low || lane >= high)
     {
       if (exp)
-	error ("%K%s %lld out of range %lld - %lld",
+	error ("%K%s %wd out of range %wd - %wd",
 	       exp, desc, lane, low, high - 1);
       else
-	error ("%s %lld out of range %lld - %lld", desc, lane, low, high - 1);
+	error ("%s %wd out of range %wd - %wd", desc, lane, low, high - 1);
     }
 }
 

Reply via email to