Re: [PATCH] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/12/21 11:03 AM, Marek Polacek wrote: On Wed, May 12, 2021 at 10:37:50AM -0400, Jason Merrill wrote: On 5/11/21 10:45 PM, Marek Polacek wrote: This patch implements [dcl.attr.grammar]/5: "If an attribute-specifier-seq appertains to a friend declaration ([class.friend]), that declaration sha

Re: [PATCH] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Marek Polacek via Gcc-patches
On Wed, May 12, 2021 at 10:37:50AM -0400, Jason Merrill wrote: > On 5/11/21 10:45 PM, Marek Polacek wrote: > > This patch implements [dcl.attr.grammar]/5: "If an attribute-specifier-seq > > appertains to a friend declaration ([class.friend]), that declaration shall > > be a definition." > > > > Th

Re: [PATCH] c++: Check attributes on friend declarations [PR99032]

2021-05-12 Thread Jason Merrill via Gcc-patches
On 5/11/21 10:45 PM, Marek Polacek wrote: This patch implements [dcl.attr.grammar]/5: "If an attribute-specifier-seq appertains to a friend declaration ([class.friend]), that declaration shall be a definition." This restriction only applies to C++11-style attributes. There are various forms of

[PATCH] c++: Check attributes on friend declarations [PR99032]

2021-05-11 Thread Marek Polacek via Gcc-patches
This patch implements [dcl.attr.grammar]/5: "If an attribute-specifier-seq appertains to a friend declaration ([class.friend]), that declaration shall be a definition." This restriction only applies to C++11-style attributes. There are various forms of friend declarations, we have friend template