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 Tue, Mar 01, 2016 at 04:38:13PM -0700, Jeff Law wrote:
> 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 think deferral is the best option here.

I agree.  I will hold off, thanks.

	Marek


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