Re: C PATCH for c/64637 (better location for -Wunused-value)

2015-12-16 Thread Jeff Law
On 12/16/2015 07:58 AM, Marek Polacek wrote: The following improves the location for "statement with no effect" warning by using the location of the expression if available. Can't use EXPR_LOCATION as *_DECLs still don't carry a location. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2

Re: C PATCH for c/64637 (better location for -Wunused-value)

2015-12-16 Thread Marek Polacek
On Wed, Dec 16, 2015 at 10:04:05AM -0500, David Malcolm wrote: > On Wed, 2015-12-16 at 15:58 +0100, Marek Polacek wrote: > > The following improves the location for "statement with no effect" warning > > by > > using the location of the expression if available. Can't use EXPR_LOCATION > > as > >

Re: C PATCH for c/64637 (better location for -Wunused-value)

2015-12-16 Thread David Malcolm
On Wed, 2015-12-16 at 16:09 +0100, Marek Polacek wrote: > On Wed, Dec 16, 2015 at 10:04:05AM -0500, David Malcolm wrote: > > On Wed, 2015-12-16 at 15:58 +0100, Marek Polacek wrote: > > > The following improves the location for "statement with no effect" > > > warning by > > > using the location of

Re: C PATCH for c/64637 (better location for -Wunused-value)

2015-12-16 Thread David Malcolm
On Wed, 2015-12-16 at 15:58 +0100, Marek Polacek wrote: > The following improves the location for "statement with no effect" warning by > using the location of the expression if available. Can't use EXPR_LOCATION as > *_DECLs still don't carry a location. Out of interest, does it emit sane underl

C PATCH for c/64637 (better location for -Wunused-value)

2015-12-16 Thread Marek Polacek
The following improves the location for "statement with no effect" warning by using the location of the expression if available. Can't use EXPR_LOCATION as *_DECLs still don't carry a location. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-12-16 Marek Polacek PR c/64637