From c1299a9e287563624e2f0ec71877163b80e49045 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 28 Feb 2018 10:01:13 +0100 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e5f9829..0adbc3f 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 6af774f..4a1267c 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); -- 2.7.4