PR c++/71147 - [6 Regression] Flexible array member wrongly rejected in template
authorMartin Sebor <msebor@redhat.com>
Tue, 24 May 2016 20:29:36 +0000 (20:29 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 24 May 2016 20:29:36 +0000 (14:29 -0600)
commitf65e97fd3dc83bdbe6a1415f9527e68c35b841b3
tree3d9ac91feb80adf20ab2902d32b9bdfb0ca76ed2
parent8e0dc0549a9d11fbf580db3ac45b49b5479dff13
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.

From-SVN: r236664
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/flexary16.C [new file with mode: 0644]
gcc/tree.h