This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix up narrowing conversion in tree-object-size.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]