From ec07e94bbf22be8cd8f47e34de5e764437e33774 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 8 Mar 2019 11:53:27 +0100 Subject: [PATCH] re PR target/79846 (s390: untranslatable diagnostic in s390.c) PR target/79846 * config/s390/s390.c (s390_const_operand_ok): Use %wu instead of HOST_WIDE_INT_PRINT_UNSIGNED and %wd instead of HOST_WIDE_INT_PRINT_DEC. Formatting fixes. From-SVN: r269489 --- gcc/ChangeLog | 5 +++++ gcc/config/s390/s390.c | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b616535..f56b266 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-03-08 Jakub Jelinek + PR target/79846 + * config/s390/s390.c (s390_const_operand_ok): Use %wu instead of + HOST_WIDE_INT_PRINT_UNSIGNED and %wd instead of + HOST_WIDE_INT_PRINT_DEC. Formatting fixes. + PR ipa/80000 * ipa-devirt.c (compare_virtual_tables): Remove two trailing spaces from diagnostics. Formatting fixes. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index aff2718..fce463f 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -734,10 +734,9 @@ s390_const_operand_ok (tree arg, int argnum, int op_flags, tree decl) if (!tree_fits_uhwi_p (arg) || tree_to_uhwi (arg) > (HOST_WIDE_INT_1U << bitwidth) - 1) { - error("constant argument %d for builtin %qF is out of range (0.." - HOST_WIDE_INT_PRINT_UNSIGNED ")", - argnum, decl, - (HOST_WIDE_INT_1U << bitwidth) - 1); + error ("constant argument %d for builtin %qF is out of range " + "(0..%wu)", argnum, decl, + (HOST_WIDE_INT_1U << bitwidth) - 1); return false; } } @@ -751,12 +750,10 @@ s390_const_operand_ok (tree arg, int argnum, int op_flags, tree decl) || tree_to_shwi (arg) < -(HOST_WIDE_INT_1 << (bitwidth - 1)) || tree_to_shwi (arg) > ((HOST_WIDE_INT_1 << (bitwidth - 1)) - 1)) { - error("constant argument %d for builtin %qF is out of range (" - HOST_WIDE_INT_PRINT_DEC ".." - HOST_WIDE_INT_PRINT_DEC ")", - argnum, decl, - -(HOST_WIDE_INT_1 << (bitwidth - 1)), - (HOST_WIDE_INT_1 << (bitwidth - 1)) - 1); + error ("constant argument %d for builtin %qF is out of range " + "(%wd..%wd)", argnum, decl, + -(HOST_WIDE_INT_1 << (bitwidth - 1)), + (HOST_WIDE_INT_1 << (bitwidth - 1)) - 1); return false; } } -- 2.7.4