Dirk Mueller - Re: [PATCH] Implement warning for wrong use of ||/&& (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Dirk Mueller
- To: "Manuel López-Ibáñez"
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Feb 2007 00:26:57 +0100
- Subject: Re: [PATCH] Implement warning for wrong use of ||/&&
- References: <200702130009.06245.dmueller@suse.de> <6c33472e0702121520o49578e28sd1565460ce674c99@mail.gmail.com>
On Tuesday, 13. February 2007 00:20, Manuel López-Ibáñez wrote:
No, please, don't do this. Walways-true warnings have nothing to do with this (the name is wrong wrong wrong, this is the same mistake that was done with Wconversion, but worse because this time the description of Walways-true is also wrong, so please let's not repeat it again).
Well, the description of -Walways-true is certainly suboptimal, yes, because it references to an example that certainly does not trigger under -Walways-true. However, I think it is the one that comes closest to the spirit of it. If you can suggest a new name, I'm perfectly fine with adding yet another warning option for this one. I was just saying that it is low false-positive and therefore imho doesn't hurt to be in -Wall.
And I cannot understand how you were able to bootstrapped this if it emits warnings for GCC code.
I submitted the patches for that beforehand ;)
PS: I think there are already warnings for wrong usage of || and && somewhere. If you don't want to bother, I would like the patch to be hold until I can look them up.
Sure, please have a look. The only thing that comes to my mind is -Wparentheses warning about expressions which include || and && without explicit precedence.
Dirk
- Follow-Ups:
- Re: [PATCH] Implement warning for wrong use of ||/&&
* From: Manuel López-Ibáñez
- Re: [PATCH] Implement warning for wrong use of ||/&&
- References:
- [PATCH] Implement warning for wrong use of ||/&&
* From: Dirk Mueller - Re: [PATCH] Implement warning for wrong use of ||/&&
* From: Manuel López-Ibáñez
- [PATCH] Implement warning for wrong use of ||/&&
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |