[Bug c/120010] __attribute__((unused)) does not work for function arguments

2025-04-29 Thread hpa at zytor dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120010 --- Comment #3 from H. Peter Anvin --- THat should of course have been __attribute__((unused)).

[Bug c/120010] __attribute__((unused)) does not work for function arguments

2025-04-29 Thread hpa at zytor dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120010 --- Comment #2 from H. Peter Anvin --- Having to omit the name puts us right back into macro hell... having to macroize every function definition. It also violates the principle of least surprise, since __attribute__((used)) works if attached t

[Bug c/120010] __attribute__((unused)) does not work for function arguments

2025-04-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120010 --- Comment #1 from Andrew Pinski --- https://gcc.gnu.org/onlinedocs/gcc-15.1.0/gcc/Common-Type-Attributes.html#index-unused-type-attribute "This is often the case with lock or thread classes, which are usually defined and then not referenced, b