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: [PATCH] Quiet down -Wlogical-op a bit (PR c/61534)


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  <polacek@redhat.com>

	PR c/61534
	* 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.
OK.
jeff


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