This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Quiet down -Wlogical-op a bit (PR c/61534)
- From: Jeff Law <law at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Dodji Seketeli <dodji at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Date: Thu, 23 Apr 2015 16:00:47 -0600
- Subject: Re: [PATCH] Quiet down -Wlogical-op a bit (PR c/61534)
- Authentication-results: sourceware.org; auth=none
- References: <20150422135631 dot GG28950 at redhat dot com>
On 04/22/2015 07:56 AM, Marek Polacek wrote:
This patch stifles -Wlogical-op a bit: don't warn if either operand comes from
a macro expansion. As the comment says, it doesn't fix the bug completely, but
it's a simple improvement. I did this by introducing a new macro.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
(Bootstrap with -Wlogical-op enabled does not pass yet.)
2015-04-22 Marek Polacek <firstname.lastname@example.org>
* input.h (from_macro_expansion_at): Define.
* c-common.c (warn_logical_operator): Bail if either operand comes
from a macro expansion.
* c-c++-common/pr61534-1.c: New test.