This is the mail archive of the gcc-patches@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]

Re: PING: [PATCH] Implement warning for wrong use of ||/&&


On 19/02/07, Dirk Mueller <dmueller@suse.de> wrote:
On Monday, 19. February 2007 16:15, Gabriel Dos Reis wrote:

>   Please factor the hunks in c-typeck (parser_build_binary_op) and
> cp/call.c (build_new_op) into
> a separate function. maybe_warn_for_suspicious_logical_operator?
>
> Patch OK with those changes.

Hmm, you can't approve both patches at the same time ;) Manuel's patch
removed -Walways-true (which I didn't like anyway, so no objection at all
from me).

That leaves me behind with having to invent a new option for this warning. As
we now have -Waddress, how about adding -Woperator (where I would add this
warning) and -Wcomparison (where all the "always true due to range of
datatype" warnings would be)?


Actually, I was planning to re-add -Walways-true for "always true due to range of datatype", since that is the current description of -Walways-true. That is the follow-up patch mentioned in the mail about Waddress.

Cheers,

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]