From: Peter Reilly Date: 2005-05-03T18:04:58+09:00 Subject: Re: -Wall Jon A. Lambert wrote: > Jim Helm wrote: > >> And by not showing us the warnings, you foster a false sense of >> security that "all is well". One indication of a high quality project >> is that it will compile cleanly with -Wall on it's primary target >> platforms. > > > -Wall on GNU gcc complains about perfectly legal C code that doesn't > need fixing. All warnings are legal C code - some may need fixing. For example, I accidently mixed signed with unsigned in code. The code looked as if it worked for 2 years, before we made a small change to another piece of code and this caused the error to be triggered. Peter > The production of certain messages may rather be an indication that > the GNU gcc compiler is broken then if one's believes that -Wall has > anything to do with quality code. After all, you should see what > -Wall on the Intel compiler spits out. It even warns you if it > suspects the source author's cholesterol is too high. Hey and why not > -W ? Even then all the possible warning messages still aren't turned > on. I've complained about -Wparentheses in particular having no > business in -Wall as it flags several "style" issues. Assignment in > conditional and the misleading ambiguous if/else. The message for > the latter should read "unambiguous statements found!!!" as there's > nothing ambiguous about any of them in C. ;-) > > -- > J Lambert > > >