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