[PATCH] c++/71147 - [6 Regression] Flexible array member wrongly rejected in template
Martin Sebor
msebor@gmail.com
Tue May 24 16:52:00 GMT 2016
>> 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 grokdeclarator. One way to avoid
>> possible problems due to evaluating the macro argument more than
>> once is to introduce a helper inline function. I haven't seen
>> it done in tree.h so I didn't introduce one in this patch either,
>> but it might be worth considering for the new macro and any other
>> non-trivial macros like it.
>
> Yes, let's just make it an inline function (of which there are already
> quite a few in tree.h).
Attached is an updated patch with this change.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-71147.patch
Type: text/x-patch
Size: 5218 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160524/ae2cda78/attachment.bin>
More information about the Gcc-patches
mailing list