https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83205

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Sat Dec 16 00:41:10 2017
New Revision: 255736

URL: https://gcc.gnu.org/viewcvs?rev=255736&root=gcc&view=rev
Log:
        Backported from mainline
        2017-12-15  Jakub Jelinek  <ja...@redhat.com>

        PR c++/83205
        * decl.c (cp_finish_decomp): Handle the case when tsize is not
        error_mark_node, but doesn't fit into uhwi.  Split up count != eltscnt
        and !tree_fits_uhwi_p (tsize) error_at calls into error_n and inform_n
        to handle plural forms properly.

        * g++.dg/cpp1z/decomp3.C: Adjust for structured binding count
        mismatch diagnostics split into error and warning with plural
        forms.
        * g++.dg/cpp1z/decomp10.C: Likewise.
        * g++.dg/cpp1z/decomp32.C: New test.

Added:
    branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/decomp32.C
Modified:
    branches/gcc-7-branch/gcc/cp/ChangeLog
    branches/gcc-7-branch/gcc/cp/decl.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog
    branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/decomp10.C
    branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/decomp3.C

Reply via email to