This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Don't print -Waddress comparison warnings for macros (PR c/48778)
- From: Marek Polacek <polacek at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Mar 2016 08:18:46 +0100
- Subject: Re: [C PATCH] Don't print -Waddress comparison warnings for macros (PR c/48778)
- Authentication-results: sourceware.org; auth=none
- References: <20160301141052 dot GZ14947 at redhat dot com> <56D627E5 dot 2090009 at redhat dot com>
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