This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] accept __null as sentinel
On Sat, 30 Apr 2005, Michael Matz wrote:
> This indicates that you never had to deal with more than a couple sources,
> whose initial author is long dead ;-) This would shift needless
> maintenance work (and "adding a cast at each call site" can be quite much)
> on the shoulders of maintainers. If the author is interested in
> portability, well, there's -pedantic. Let's keep -Wall usable and not
> force people to do "-W -Wall -Wno-not-this-one -Wno-thats-dumb-too
> -Wno-cant-break-anything" to get at the usefull warnings.
I have cleaned up large bodies of old code to minimise or avoid altogether
warnings from a rather bigger set of options than -Wall (-Wall -W
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align
-Wcast-qual -Wwrite-strings is my minimal set, sometimes I may add
-Wold-style-definition -Wshadow -Wredundant-decls -Wnested-externs
-Wmissing-noreturn -Wformat-security -Wmissing-format-attribute
-Winit-self for my own code). Yes, there's a fair amount of repetitive
work involved, but it finds bugs and improves the reliability and
maintainability of the code for the future. Fixing potential problems
that might cause problems in future even if they don't cause problems at
present in the environment the code is being used in right now is a useful
endeavour if you expect the code to have a long life or widespread use.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)