Re: [PATCH] c++: Don't complain about [[maybe_unused]] on non-static data members

2021-06-13 Thread Jason Merrill via Gcc-patches
On Fri, Jun 11, 2021 at 5:44 PM Jakub Jelinek wrote: > On Fri, Jun 11, 2021 at 10:35:58PM +0200, Jakub Jelinek wrote: > > > But I also agree that GCC shouldn't warn here. > > > > We could do that by using a wrapper around handle_unused_attribute > > for the maybe_unused attribute, that way warn o

[PATCH] c++: Don't complain about [[maybe_unused]] on non-static data members

2021-06-11 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 11, 2021 at 10:35:58PM +0200, Jakub Jelinek wrote: > > But I also agree that GCC shouldn't warn here. > > We could do that by using a wrapper around handle_unused_attribute > for the maybe_unused attribute, that way warn on unused attribute on > FIELD_DECLs, but not for maybe_unused (u