This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83205] ICE on structured binding with ill-formed negative std::tuple_size<T>::value
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Dec 2017 21:41:17 +0000
- Subject: [Bug c++/83205] ICE on structured binding with ill-formed negative std::tuple_size<T>::value
- Auto-submitted: auto-generated
- References: <bug-83205-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83205
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Dec 15 21:40:45 2017
New Revision: 255706
URL: https://gcc.gnu.org/viewcvs?rev=255706&root=gcc&view=rev
Log:
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:
trunk/gcc/testsuite/g++.dg/cpp1z/decomp32.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp1z/decomp10.C
trunk/gcc/testsuite/g++.dg/cpp1z/decomp3.C