Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-08-10 Thread Marek Polacek
On Thu, Aug 10, 2017 at 10:52:54AM +0200, Andreas Schwab wrote: > On Jul 13 2017, Marek Polacek wrote: > > > diff --git gcc/testsuite/objc.dg/proto-lossage-4.m > > gcc/testsuite/objc.dg/proto-lossage-4.m > > index e72328b3703..4c6b560bab4 100644 > > ---

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-08-10 Thread Andreas Schwab
On Jul 13 2017, Marek Polacek wrote: > diff --git gcc/testsuite/objc.dg/proto-lossage-4.m > gcc/testsuite/objc.dg/proto-lossage-4.m > index e72328b3703..4c6b560bab4 100644 > --- gcc/testsuite/objc.dg/proto-lossage-4.m > +++ gcc/testsuite/objc.dg/proto-lossage-4.m > @@ -28,13

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-08-08 Thread Joseph Myers
On Thu, 13 Jul 2017, Marek Polacek wrote: > Bootstrapped/regtested on x86_64-linux and powerpc64le-unknown-linux-gnu, > ok for trunk? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-08-08 Thread Marek Polacek
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. > >

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-31 Thread Marek Polacek
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

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-20 Thread Marek Polacek
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 >

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-19 Thread David Malcolm
On Thu, 2017-07-13 at 16:18 +0200, Marek Polacek wrote: > This patch improves diagnostic in the C FE by printing the types when > reporting > a problem with a conversion. E.g., instead of > >warning: assignment from incompatible pointer type > > you'll now get > > warning: assignment to

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-19 Thread Marek Polacek
On Fri, Jul 14, 2017 at 02:02:34PM -0600, Martin Sebor wrote: > Just to be clear: I don't mean to suggest to do this in this patch > or necessarily even for this warning. I'm not even sure to what > extent it might be doable. I mention it mostly as food for thought. Sure, and it makes sense

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-14 Thread Martin Sebor
On 07/14/2017 09:40 AM, Martin Sebor wrote: On 07/14/2017 07:47 AM, Marek Polacek wrote: On Fri, Jul 14, 2017 at 02:52:36PM +0200, Marek Polacek wrote: On Thu, Jul 13, 2017 at 11:42:15AM -0600, Martin Sebor wrote: On 07/13/2017 08:18 AM, Marek Polacek wrote: This patch improves diagnostic in

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-14 Thread Martin Sebor
On 07/14/2017 07:47 AM, Marek Polacek wrote: On Fri, Jul 14, 2017 at 02:52:36PM +0200, Marek Polacek wrote: On Thu, Jul 13, 2017 at 11:42:15AM -0600, Martin Sebor wrote: On 07/13/2017 08:18 AM, Marek Polacek wrote: This patch improves diagnostic in the C FE by printing the types when

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-14 Thread Marek Polacek
On Fri, Jul 14, 2017 at 02:52:36PM +0200, Marek Polacek wrote: > On Thu, Jul 13, 2017 at 11:42:15AM -0600, Martin Sebor wrote: > > On 07/13/2017 08:18 AM, Marek Polacek wrote: > > > This patch improves diagnostic in the C FE by printing the types when > > > reporting > > > a problem with a

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-14 Thread Marek Polacek
On Thu, Jul 13, 2017 at 11:42:15AM -0600, Martin Sebor wrote: > On 07/13/2017 08:18 AM, Marek Polacek wrote: > > This patch improves diagnostic in the C FE by printing the types when > > reporting > > a problem with a conversion. E.g., instead of > > > >warning: assignment from incompatible

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-13 Thread Martin Sebor
On 07/13/2017 08:18 AM, Marek Polacek wrote: This patch improves diagnostic in the C FE by printing the types when reporting a problem with a conversion. E.g., instead of warning: assignment from incompatible pointer type you'll now get warning: assignment to 'int *' from incompatible