https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100596

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> Rejecting such code was the point of the patch.  I guess we'll have to
> either downgrade to a warning or just not complain about GNU attributes at
> all.

Let's do both.

It occurs to me that attributes on non-definition friends can be useful when
there is no other reachable declaration of the function, as

struct A
{
  __attribute((deprecated)) friend void f(A); // part of A API, definition in
.C
};

int main()
{
  A a;
  f(a); // warning desired
}

Reply via email to