From: Jakub Jelinek Date: Wed, 28 Feb 2018 09:01:13 +0000 (+0100) Subject: decl.c (cp_finish_decomp): Don't adjust eltscnt when calling inform_n. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1299a9e287563624e2f0ec71877163b80e49045;p=gcc.git decl.c (cp_finish_decomp): Don't adjust eltscnt when calling inform_n. * decl.c (cp_finish_decomp): Don't adjust eltscnt when calling inform_n. From-SVN: r258058 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e5f98293c32..0adbc3f93c6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2018-02-28 Jakub Jelinek + + * decl.c (cp_finish_decomp): Don't adjust eltscnt when calling + inform_n. + 2018-02-27 Martin Sebor * pt.c: Avoid including directly. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6af774fc0fd..4a1267c9367 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7535,10 +7535,7 @@ cp_finish_decomp (tree decl, tree first, unsigned int count) error_n (loc, count, "only %u name provided for structured binding", "only %u names provided for structured binding", count); - /* Some languages have special plural rules even for large values, - but it is periodic with period of 10, 100, 1000 etc. */ - inform_n (loc, eltscnt > INT_MAX - ? (eltscnt % 1000000) + 1000000 : eltscnt, + inform_n (loc, eltscnt, "while %qT decomposes into %wu element", "while %qT decomposes into %wu elements", type, eltscnt);