This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][ARM] Use %wd format for lane printing in bounds_check
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Fri, 14 Aug 2015 10:56:54 +0100
- Subject: [PATCH][ARM] Use %wd format for lane printing in bounds_check
- Authentication-results: sourceware.org; auth=none
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.tkachov@arm.com>
* config/arm/arm.c (bounds_check): Use %wd print format
for HOST_WIDE_INT arguments.
commit 004a6baac827ae61c6be32f570decff56e987995
Author: Kyrylo Tkachov <kyrylo.tkachov@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);
}
}