* [PATCH][ARM] Use %wd format for lane printing in bounds_check
@ 2015-08-14 10:20 Kyrill Tkachov
2015-08-19 8:17 ` Ramana Radhakrishnan
0 siblings, 1 reply; 2+ messages in thread
From: Kyrill Tkachov @ 2015-08-14 10:20 UTC (permalink / raw)
To: GCC Patches; +Cc: Ramana Radhakrishnan, Richard Earnshaw
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: arm-bounds-err.patch --]
[-- Type: text/x-patch; name=arm-bounds-err.patch, Size: 810 bytes --]
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);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][ARM] Use %wd format for lane printing in bounds_check
2015-08-14 10:20 [PATCH][ARM] Use %wd format for lane printing in bounds_check Kyrill Tkachov
@ 2015-08-19 8:17 ` Ramana Radhakrishnan
0 siblings, 0 replies; 2+ messages in thread
From: Ramana Radhakrishnan @ 2015-08-19 8:17 UTC (permalink / raw)
To: Kyrill Tkachov, GCC Patches; +Cc: Ramana Radhakrishnan, Richard Earnshaw
On 14/08/15 10:56, Kyrill Tkachov wrote:
> 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?
OK - I'd consider this sort of thing as obvious.
ramana
>
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-19 7:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 10:20 [PATCH][ARM] Use %wd format for lane printing in bounds_check Kyrill Tkachov
2015-08-19 8:17 ` Ramana Radhakrishnan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).