On Mon, 25 Jun 2018, Martin Sebor wrote: > Sure. I think we could easily exempt most of the tests from > diagnosing without compromising the efficacy of the warning > by silently accepting definitions of () functions that take no > arguments (and diagnosing calls to them that pass some). What > I think is important to preserve is diagnosing () declarations.
My general rule of thumb here is: if the function definitions / declarations / calls in question would be valid C++, with () interpreted as no arguments, warning by default is questionable. If you have an old-style definition with arguments and no prior prototype, or a () declaration followed by a call or definition with arguments, warning by default is more reasonable. -- Joseph S. Myers jos...@codesourcery.com