https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102953
--- Comment #14 from Andrew Cooper <andrew.cooper3 at citrix dot com> --- (In reply to H.J. Lu from comment #13) > (In reply to Andrew Cooper from comment #11) > > > > There should be a diagnostic, but it ought to include cf_check in the type > > it prints. > > Try the v3 patch. Thanks. Now get: proto.c:2:37: error: conflicting types with implied 'nocf_check' attribute for 'foo'; have 'void(void)' 2 | static void __attribute__((unused)) foo(void) | ^~~ proto.c:1:39: note: previous declaration of 'foo' with type 'void(void)' 1 | static void __attribute__((cf_check)) foo(void); | ^~~ which at least highlights the issue. Any variant like this, but possibly even simply reporting 'void __attribute__((nocf_check))(void)' should be fine.