https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86407
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- The warning could be suppressed by pragma diagnostic around the typedef like so: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wattributes" typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID); #pragma GCC diagnostic pop Unfortunately, it doesn't look like it's possible to include the pragmas (in the form of _Pragma("GCC diagnostic pop")) as part of the typedef itself and have them have the same effect.