2012/1/17 Jason Merrill <ja...@redhat.com>: > On 01/17/2012 02:30 PM, Kai Tietz wrote: >> >> 2012/1/17 Jason Merrill<ja...@redhat.com>: >>> >>> How does this happen? Are we setting DECL_ATTRIBUTES twice? >> >> >> Yes, we call it for this example twice. One time in >> 'begin_class_definition'. and second time in 'do_friend'. > > > Surely the call from begin_class_definition isn't for the function > declaration, though. > > Jason
Right, but in second call we get for cplus_decl_attributes's late_attrs (as result of splice_template_attributes) the same value as already stored in decl_p's attributes. By this we chain up an endless-recusion. Kai