Patchwork Bootstrap failure in tree-object-size.c due to -Wnarrowing (was: [C++ Patch] PR 50810)

login
register
mail settings
Submitter Eric Botcazou
Date Oct. 23, 2011, 8:17 p.m.
Message ID <201110232217.15385.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/121242/
State New
Headers show

Comments

Eric Botcazou - Oct. 23, 2011, 8:17 p.m.
> 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  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (create_concat_name): Add explicit cast.

Patch

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);
     }