On Sun, Oct 09, 2022 at 10:25:47PM +0100, Sam James wrote: > ## Bonus > > It also *warns* about K&R declarations and ill-defined, deprecated > prototypes, > so for bonus work, test with: > * -Werror=strict-prototypes (C only) > * -Werror=deprecated-non-prototype (C only) > > It's suggested that if you don't want to fix these errors, you try > adding the -std=gnu89 flag instead. Note that -Werror=strict-prototypes breaks /tons/ because it fails on the following: int myfunc() { return 0; } But the above is fine with -std=c2x, and I don't think it's worth starting to add (void) /everywhere/ downstream if it's going to be okay'ish. "Hopefully" clang won't try to do that check by default again, the breakage would be on the next level... so I'd tentatively say, don't worry about this and focus attention where it's more urgent (aka implicits and incompatible pointer types, may even fix other bugs at same time). On the other hand, warnings from -Wdeprecated-non-prototype do fail with `clang -std=c2x`. So if come across a K&R-style source mostly beyond fixing, do consider `append-cflags -std=gnu89`. An alternative way to test so don't need to add -Wno* everywhere on top of -std=gnu* is to straight up test with `clang -std=c2x` rather than the -Werror (not to say it's perfect given c2x makes assumptions, but doing this can pick up more errors too). (reminder that gcc/clang don't enable c2x by default and isn't urgent, but this will happen sooner or later) -- ionen