https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104652
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Summary|It's impossible to declare |It's impossible to declare |non-default target function |non-first target function |as a friend. |as a friend Status|UNCONFIRMED |NEW Keywords| |rejects-valid Last reconfirmed| |2022-02-23 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- It is actually just the non-first one which is not a friend. Note it looks like clang, and ICC both have the same bug :).