On Wed, Jan 17, 2018 at 4:07 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Jan 17, 2018 at 02:31:29PM -0500, Jason Merrill wrote: >> > First, thanks for your messages. Personally, at this late time for 8, I >> > vote for something like my most recent grokdeclarator fix and yours above >> > for 83824. Then, for 9, or even 8.2, the more encompassing change for all >> > those chainons. Please both of you let me know how shall we proceed, I >> > could certainly take care of the latter too from now on. Thanks again! >> >> Let's go ahead with your patch to grokdeclarator. In the parser, >> let's do what Jakub is suggesting here: >> >> > So, either we want to go with what Paolo posted even in this case, >> > i.e. turn decl_specs->attributes into error_mark_node if attrs >> > is error_mark_node, and don't chainon anything to it if >> > decl_specs->attributes >> > is already error_mark_node, e.g. something like: >> > if (attrs == error_mark_node || decl_specs->attributes == error_mark_node) >> > decl_specs->attributes = error_mark_node; >> > else >> > decl_specs->attributes = chainon (decl_specs->attributes, attrs); >> >> without any assert. Putting this logic in an attr_chainon function sounds >> good. > > So like this? So far just tested with make check-c++-all on both > x86_64-linux and i686-linux, full bootstrap/regtest scheduled, ok if it > passes? I gave up on the original idea to return void and have the first > argument pointer, because while many of the calls do x = chainon (x, y);, > there are several ones that assign it to something else, like y = chainon (x, > y); > etc.
Looks good. Jason