This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, 24 Feb 2009 18:57:58 +0100, Harvey Chapman <hchapman-gcc-help@3gfp.com> wrote:I've been using GCC since '96 or so. I've always understood "-Wall" to mean all relevant warnings, not every possible warning but the ones that are deemed reasonable to find bugs in code.
Ian Lance Taylor wrote:Why not change it to -Wmost or -Wpopular and then mark -Wall as deprecated for 3-5 years before removal. I would think that would be a reasonable time frame for such a change with so much history. Or just leave -Wall as-is, and just discourage further use via a deprecated warning.The name -Wall was chosen some 20 years ago. Perhaps it was a mistake, however it was decided, and documented, and has been used successfully, for a long time. I think it would take a very persuasive argument to change it now. That argument would need to be more than merely "the name doesn't seem right for what it does." You need to consider the cost of changing all the Makefiles out there which use it, and the benefits of making the change.
Deprecation sounds like a great idea. If I have a vote for new name, then I give it to "-Wselect-popular-warnings" as suggested by Eljay.
I can think of three groups of people who would benefit from the deprecation:
1) People who use the flag and believe that it actually means all warnings. Why check the docs on something so obvious? These people will be happy about the deprecation because it will make them realize that there are more warnings they can enable.
2) People who have read the docs and are confused about the name (I am in this group now). These people will keep asking questions about the name unless it is deprecated.
3) People who know the docs by heart and don't really think it matters if the name says something else than what it does. These people won't have to explain the flag over and over again for people from group 2.I'm more interested in not breaking GCC. If my projects start building with 1000s of useless warnings it means I'll have to either "fix" them in the code (useless casts, etc) or disable them in my makefile. And instead of just having -Wall -W I'd have "-Wall -Wno-stupid-warning1 -Wno-stuipid-warning2 .... 100 chars more ... -Wno-stupid-warning100".
Other arguments:It enables all useful flags, where "useful" is subjective but from what I understand means "likely to flag real problems." Your flaw in your reasoning is you think additional "scrutiny" is meaningful in the face of a well understood standard.
1) The name says "all", while the flag does not enable all.
2) The flag might change between versions. So some warnings included in the flag might be removed, whereas the name suggests that it includes at least everything you had before.That's at least a reasonable concern.
3) Because it seems like a lot of people agree that the name is not right, and has proven to cause confusion.Wait till you have 10-15-20 years of development under your belt. Your attitude will change.
4) It's not an argument to keep it even if it might have been inconsistent for 20 years.I don't know, it's served people well.
5) Deprecating it would avoid confusion with a possible future flag that might actually enable all warnings.And require [albeit trivial] changes to software for no net gain.
6) I might be running out of arguments, but I will buy you a beer once it is deprecated, Ian :)Learn C, then buy the beer.
float a = 4; or char b = 'c';
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |