https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51677
--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #3) > It should be easy to white-list the main function in the > -Wsuggest-attribute= checker. At the same time, I'm not sure it's necessary > or that the problem is unique to main. The reasons noted in comment #0 > apply to other functions as well. Defining empty functions is useful for a > variety of reasons (e.g., default no-op handlers or, in C++, default no-op > implementations of virtual functions). Similarly, without perfect data flow > analysis across the whole program it's impossible to tell whether an extern > function is ever called. Why should main be treated differently from those? Because it's an easy first step that doesn't require doing all of those extra data flow analyses