This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C PATCH to display types when printing a conversion warning (PR c/81233)
- From: Marek Polacek <polacek at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>, Martin Sebor <msebor at redhat dot com>
- Date: Tue, 8 Aug 2017 13:28:48 +0200
- Subject: Re: C PATCH to display types when printing a conversion warning (PR c/81233)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=polacek at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 48448806A3
- References: <20170713141820.GD2890@redhat.com> <1500475893.8655.7.camel@redhat.com> <20170720105310.GE9043@redhat.com> <20170731112701.GO3397@redhat.com>
Ping.
On Mon, Jul 31, 2017 at 01:27:01PM +0200, Marek Polacek wrote:
> Ping.
>
> On Thu, Jul 20, 2017 at 12:53:10PM +0200, Marek Polacek wrote:
> > On Wed, Jul 19, 2017 at 10:51:33AM -0400, David Malcolm wrote:
> > > The changes to diagnostic-core.h and diagnostic.c are OK.
> >
> > Thanks.
> >
> > > > Also,
> > > > PEDWARN_FOR_ASSIGNMENT didn't work with the addition of printing TYPE
> > > > and
> > > > RHSTYPE so I just decided to unroll the macro instead of making it
> > > > even more
> > > > ugly.
> > > > This patch is long but it's mainly because of the testsuite fallout.
> > >
> > > The comment by PEDWARN_FOR_ASSIGNMENT says:
> > >
> > >
> > > /* This macro is used to emit diagnostics to ensure that all format
> > > strings are complete sentences, visible to gettext and checked
> > > at
> > > compile time. */
> > >
> > > I wonder if it's possible to convert it to an inline function to get
> > > the same test coverage, without unrolling the macro?
> >
> > Yeah, I tried, but the resulting inline function would have to have 12
> > parameters if I count well and that didn't seem like a win. Perhaps
> > splitting convert_for_assignment would make sense, but likely not as
> > part of this patch.
Marek