[Bug c++/71147] [6 Regression] Flexible array member wrongly rejected in template
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 25 16:27:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71147
--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Wed May 25 16:01:24 2016
New Revision: 236729
URL: https://gcc.gnu.org/viewcvs?rev=236729&root=gcc&view=rev
Log:
PR c++/71147 - [6 Regression] Flexible array member wrongly rejected in
template
gcc/ChangeLog:
2016-05-24 Martin Sebor <msebor@redhat.com>
PR c++/71147
* gcc/tree.h (complete_or_array_type_p): New inline function.
gcc/testsuite/ChangeLog:
2016-05-24 Martin Sebor <msebor@redhat.com>
PR c++/71147
* g++.dg/ext/flexary16.C: New test.
gcc/cp/ChangeLog:
2016-05-24 Martin Sebor <msebor@redhat.com>
PR c++/71147
* decl.c (layout_var_decl, grokdeclarator): Use
complete_or_array_type_p.
* pt.c (instantiate_class_template_1): Try to complete the element
type of a flexible array member.
(can_complete_type_without_circularity): Handle arrays of unknown
bound.
* typeck.c (complete_type): Also complete the type of the elements of
arrays with an unspecified bound.
Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/ext/flexary16.C
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/decl.c
branches/gcc-6-branch/gcc/cp/pt.c
branches/gcc-6-branch/gcc/cp/typeck.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree.h
More information about the Gcc-bugs
mailing list