I think it is not included in -Wall because such prototype are legitimate pre-ANSI K&R C function prototypes.
Re:Declaring C String Constants
by iainmerrick on Wednesday May 17, 2017 @08:30PM
(#14364011)
Hmm, could be! Maybe explicitly specifying a newer standard might do the trick then. I'll try a few things.
Edit to add: Aha, my 'gcc' was actually Clang because I'm on OS X. Installing the real GCC, I find:
gcc -Wstrict-prototypes does what I want and disallows this feature. But -Wall doesn't include that flag, and GCC doesn't seem to have -Weverything.
Clang accepts -Wstrict-prototypes but doesn't catch no-arg functions! That's bad. Even with -Weverything, Clang lets you do anything you want with no-arg functions. Very bad.