This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][cp][committed] Fix bootstrap on arm due to print format warning
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Martin Sebor <msebor at gmail dot com>
- Date: Fri, 06 Nov 2015 13:34:58 +0000
- Subject: [PATCH][cp][committed] Fix bootstrap on arm due to print format warning
- Authentication-results: sourceware.org; auth=none
Hi all,
With Martins' patch at https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00492.html
I'm seeing an arm bootstrap error due to a warning in the print format addressed in this patchlet.
bytes_avail is an unsigned HOST_WIDE_INT and so needs the %wu print format rather than %lu which
may not be correct on all platforms.
Bootstrap on arm-none-linux-gnueabihf now passes so I'm committing this to trunk as obvious.
Thanks,
Kyrill
2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* init.c (warn_placement_new_too_small): Use %wu format
rather than %lu when printing bytes_avail.
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 7386499..337797c 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -2447,7 +2447,7 @@ warn_placement_new_too_small (tree type, tree nelts, tree size, tree oper)
"%<%T [%wu]%> and size %qwu in a region of type %qT "
"and size %qwi"
: "placement new constructing an object of type "
- "%<%T [%lu]%> and size %qwu in a region of type %qT "
+ "%<%T [%wu]%> and size %qwu in a region of type %qT "
"and size at most %qwu",
type, tree_to_uhwi (nelts), bytes_need,
TREE_TYPE (oper),