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: [C PATCH] Don't print -Waddress comparison warnings for macros (PR c/48778)


On 03/01/2016 07:10 AM, Marek Polacek wrote:
This PR from 2011 reports that -Waddress prints unhelpful warning when the
comparison comes from a macro.  Since I've added from_macro_expansion_at,
this is easy to circumvent.  I'm not so sure we actually want to disable
the warning in the case of a macro, but probably yes.

Bootstrapped/regtested on x86_64-linux, ok for trunk or should I defer to
GCC 7?

2016-03-01  Marek Polacek  <polacek@redhat.com>

	PR c/48778
	* c-typeck.c (build_binary_op): Don't issue -Waddress warnings
	for macro expansions.

	* gcc.dg/Waddress-2.c: New test.
I've got mixed feelings about this patch. Though we have traditionally desired to suppress some warnings that occur due to macro expansions, based on that, I'll ack for the trunk.

Thanks,
jeff


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