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

2016-05-24 Thread Jason Merrill
On 05/24/2016 04:43 PM, Martin Sebor wrote: On 05/24/2016 12:51 PM, Jason Merrill wrote: On 05/24/2016 12:15 PM, Martin Sebor wrote: + else if (TREE_CODE (type) == ARRAY_TYPE /* && TYPE_DOMAIN (type) */) Why is this commented out rather than removed in this version of the patch? Let's remov

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

2016-05-24 Thread Martin Sebor
On 05/24/2016 12:51 PM, Jason Merrill wrote: On 05/24/2016 12:15 PM, Martin Sebor wrote: + else if (TREE_CODE (type) == ARRAY_TYPE /* && TYPE_DOMAIN (type) */) Why is this commented out rather than removed in this version of the patch? Let's remove it, as before. OK with that change. It w

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

2016-05-24 Thread Jason Merrill
On 05/24/2016 12:15 PM, Martin Sebor wrote: + else if (TREE_CODE (type) == ARRAY_TYPE /* && TYPE_DOMAIN (type) */) Why is this commented out rather than removed in this version of the patch? Let's remove it, as before. OK with that change. Jason

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

2016-05-24 Thread Martin Sebor
Thanks for the suggestions. I implemented them in the attached update to the the patch. The macro I added evaluates its argument multiple times. That normally isn't a problem unless it's invoked with a non-trivial argument like a call to complete_type() that's passed to COMPLETE_TYPE_P() in gro

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

2016-05-23 Thread Jason Merrill
On 05/23/2016 07:18 PM, Martin Sebor wrote: On 05/19/2016 07:30 AM, Jason Merrill wrote: 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 wron

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

2016-05-23 Thread Martin Sebor
On 05/19/2016 07:30 AM, Jason Merrill wrote: 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

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

2016-05-19 Thread Jason Merrill
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.

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

2016-05-18 Thread Martin Sebor
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. Thanks Martin PR c++/71147 - [6 Regression]