This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR 17946: warning message for suspect "a && MASK"
- From: "Thomas R. Truscott" <trt at cs dot duke dot edu>
- To: jsm at polyomino dot org dot uk (Joseph S. Myers)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 12 Oct 2004 13:51:00 -0400 (EDT)
- Subject: Re: [PATCH] PR 17946: warning message for suspect "a && MASK"
> I think this may lead to duplicate diagnostics from truthvalue_conversion
> if the expression being used as a truth value isn't valid as such.
Sure enough, this gives a duplicate warning:
int main()
{
return main && main;
}
What I did for years was just comment-out the conversion.
But I figured that wouldn't be acceptable either :-) Sigh.