This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] c++/71147 - [6 Regression] Flexible array member wrongly rejected in template


On 05/18/2016 09:40 PM, Martin Sebor wrote:
The handling of flexible array members whose element type was
dependent tried to deal with the case when the element type
was not yet completed but it did it wrong.  The attached patch
corrects the handling by trying to complete the element type
first.

How about changing complete_type to complete the element type even for an array of unknown bound? It seems to me that it would be useful to do that to set alignment and 'structor flags even if we can't set TYPE_SIZE.

It would also be useful to have a 'complete type or array of unknown bound of complete type' predicate to use here and in layout_var_decl, grokdeclarator, and type_with_alias_set_p.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]