https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101545
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-04-09 Ever confirmed|0 |1 Summary|[[nodiscard]]: Incorrect |copy attribute is not |warning when creating a |copying the C++11/C23 |function alias |attributes correctly. CC| |pinskia at gcc dot gnu.org Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. It has nothing to do with aliases at all. All has to do with the copy attribute not copying the C++11/C23 attributes correctly. Even the following C++ code incorrectly warns. Like: ``` [[maybe_unused]] int foo(void); [[gnu::copy(foo)]] extern __typeof__(foo) bar; ```