This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix up narrowing conversion in tree-object-size.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Jul 2016 09:51:09 +0200
- Subject: [committed] Fix up narrowing conversion in tree-object-size.c
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
The reporter mentioned in PR71941 a narrowing conversion in
tree-object-size.c. Normally we build with -std=gnu++98 at least during
bootstrap, so this doesn't show up, but I've committed following as obvious
anyway:
2016-07-21 Jakub Jelinek <jakub@redhat.com>
* tree-object-size.c (unknown): Use HOST_WIDE_INT_M1U instead of -1.
--- gcc/tree-object-size.c.jj 2016-07-21 08:59:55.000000000 +0200
+++ gcc/tree-object-size.c 2016-07-21 09:43:29.288555197 +0200
@@ -43,7 +43,12 @@ struct object_size_info
unsigned int *stack, *tos;
};
-static const unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 };
+static const unsigned HOST_WIDE_INT unknown[4] = {
+ HOST_WIDE_INT_M1U,
+ HOST_WIDE_INT_M1U,
+ 0,
+ 0
+};
static tree compute_object_offset (const_tree, const_tree);
static unsigned HOST_WIDE_INT addr_object_size (struct object_size_info *,
Jakub