https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85926
Bug ID: 85926 Summary: feature request: more fine-grained Wno-ignored-attributes Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rv at rasmusvillemoes dot dk Target Milestone: --- I need to enable -mlongcall for a PPC/VxWorks target. However, starting from gcc 6, that leads to lots of warnings due to the "longcall" attribute being implicitly added to all function declarations. I can (and for now do) set -Wno-ignored-attributes, but I'd actually like to enable as many warnings as possible, and Wignored-attributes seems like it could catch some potentially problematic cases. So would it be possible to implement something like -Wno-ignored-attributes=longjump i.e., be able to provide a list of attribute names that shouldn't cause a warning? Then one could still get warnings about an ignored aligned attribute, etc. Looking briefly into the code, it looks like strip_typedefs should be able to return a list of removed attributes rather than just a bool, and the code in gcc/cp/pt.c could then check if there was any element in that list not in the list of no-ignoredd-attributes exception list. Of course, that's oversimplifying, since a bare -Wno-ignored-attributes would need to continue to mean everything, and what would a subsequent -Wignored-attributes then do, etc.