Re:Modern C
by manishsharan on Friday September 04, 2020 @09:25AM
(#24374708)
This. I wish all C books had more chapters on this.
Not all the warnings, as many are not useful. But take -Wall -Wextra and see how that suits you and tweak it if necessary.
I really wish compilers had a -Wstandard and that warned on standard breaking things vs -Wall or -Wextra which has compiler specific junk like -Wparentheses
Perhaps -Wpedantic is what you want?
With all those combined it's quite hard to hit segmentation faults and memory corruption and the source code will generally become "cleaner" and more robust.