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]

RE: backport the fixes of PR target/64011 and /61749 to 4.9 gcc


On Wed, 10 Jun 2015, weixiangyu wrote:

> +  if (bitsize + bitnum > unit && bitnum < unit) 
> +    { 
> +      warning (OPT_Wextra, "write of "HOST_WIDE_INT_PRINT_UNSIGNED"bit data " 
> +               "outside the bound of destination object, data truncated into " 
> +               HOST_WIDE_INT_PRINT_UNSIGNED"bit", bitsize, unit - bitnum); 

HOST_WIDE_INT_PRINT_UNSIGNED is a printf format, which depends on the host 
and is not suitable for any translatable string, not a format for GCC's 
pretty printers.  Use %wu instead in any call to a GCC diagnostic 
function.  Mainline appears to have this correct.

-- 
Joseph S. Myers
joseph@codesourcery.com


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