From patchwork Sun Oct 23 20:17:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Bootstrap failure in tree-object-size.c due to -Wnarrowing (was: [C++ Patch] PR 50810) Date: Sun, 23 Oct 2011 10:17:14 -0000 From: Eric Botcazou X-Patchwork-Id: 121242 Message-Id: <201110232217.15385.ebotcazou@adacore.com> To: Gerald Pfeifer Cc: gcc-patches@gcc.gnu.org, Paolo Carlini , Jason Merrill > The code in question is > > static unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 }; > > This is on amd64-unknown-freebsd8.0, though I am puzzled it does not > seem to trigger for other 64-bit platforms? It does trigger on Linux. I guess the patch wasn't bootstrapped. There is another problem in Ada. Fixed thusly. 2011-10-23 Eric Botcazou * gcc-interface/decl.c (create_concat_name): Add explicit cast. Index: gcc-interface/decl.c =================================================================== --- gcc-interface/decl.c (revision 180235) +++ gcc-interface/decl.c (working copy) @@ -8976,7 +8976,7 @@ create_concat_name (Entity_Id gnat_entit if (suffix) { - String_Template temp = {1, strlen (suffix)}; + String_Template temp = {1, (int) strlen (suffix)}; Fat_Pointer fp = {suffix, &temp}; Get_External_Name_With_Suffix (gnat_entity, fp); }