Re: [PATCH 0/3] Re: [PATCH] PR c/68473: sanitize source range-printing within certain macro expansions

2015-12-14 Thread Bernd Schmidt
On 12/11/2015 07:45 PM, David Malcolm wrote: The third patch in the kit is the earlier workaround for the bug; as before it degrades diagnostic-printing to just print a caret for the awkward cases, rather than attempting to print a range. I'm a little confused now, do the first two patches

[PATCH 0/3] Re: [PATCH] PR c/68473: sanitize source range-printing within certain macro expansions

2015-12-11 Thread David Malcolm
On Tue, 2015-11-24 at 13:43 +0100, Bernd Schmidt wrote: > On 11/23/2015 07:26 PM, David Malcolm wrote: > > > > In theory we could attempt to try to handle this kind of thing by > > looking at the macro expansions, and to print something like: > > > > 13 TEST_EQ (fmin); > >

Re: [PATCH] PR c/68473: sanitize source range-printing within certain macro expansions

2015-12-10 Thread Martin Sebor
On 11/23/2015 10:52 AM, David Malcolm wrote: This patch fixes PR c/68473 by bulletproofing the new diagnostic_show_locus implementation against ranges that finish before they start (which can happen when using the C preprocessor), falling back to simply printing a caret. Successfully

Re: [PATCH] PR c/68473: sanitize source range-printing within certain macro expansions

2015-11-24 Thread Bernd Schmidt
On 11/23/2015 07:26 PM, David Malcolm wrote: In theory we could attempt to try to handle this kind of thing by looking at the macro expansions, and to print something like: 13 TEST_EQ (fmin); ^~~~ 6 if ((long)FUNC##l(xl,xl) != (long)xl) \

Re: [PATCH] PR c/68473: sanitize source range-printing within certain macro expansions

2015-11-23 Thread David Malcolm
On Mon, 2015-11-23 at 18:59 +0100, Bernd Schmidt wrote: > On 11/23/2015 06:52 PM, David Malcolm wrote: > > This patch fixes PR c/68473 by bulletproofing the new > > diagnostic_show_locus implementation against ranges that finish before > > they start (which can happen when using the C

[PATCH] PR c/68473: sanitize source range-printing within certain macro expansions

2015-11-23 Thread David Malcolm
This patch fixes PR c/68473 by bulletproofing the new diagnostic_show_locus implementation against ranges that finish before they start (which can happen when using the C preprocessor), falling back to simply printing a caret. Successfully bootstrapped on x86_64-pc-linux-gnu; adds 7 new PASS

Re: [PATCH] PR c/68473: sanitize source range-printing within certain macro expansions

2015-11-23 Thread Bernd Schmidt
On 11/23/2015 06:52 PM, David Malcolm wrote: This patch fixes PR c/68473 by bulletproofing the new diagnostic_show_locus implementation against ranges that finish before they start (which can happen when using the C preprocessor), falling back to simply printing a caret. Hmm, wouldn't it be