diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-02-28 10:01:13 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-02-28 10:01:13 +0100 |
commit | c1299a9e287563624e2f0ec71877163b80e49045 (patch) | |
tree | 0c10ee1258b0d0695809fb210aa3b9a2356ca9a6 | |
parent | ce579a4fe084bb4aea2b677592e114639d9afc07 (diff) | |
download | gcc-c1299a9e287563624e2f0ec71877163b80e49045.zip gcc-c1299a9e287563624e2f0ec71877163b80e49045.tar.gz gcc-c1299a9e287563624e2f0ec71877163b80e49045.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | 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 <jakub@redhat.com> + + * decl.c (cp_finish_decomp): Don't adjust eltscnt when calling + inform_n. + 2018-02-27 Martin Sebor <msebor@redhat.com> * pt.c: Avoid including <string> 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); |