Re: Fix PR86575

2018-11-14 Thread Michael Matz
Hi, On Wed, 14 Nov 2018, Marek Polacek wrote: > > static gimple * > > collect_fallthrough_labels (gimple_stmt_iterator *gsi_p, > > - auto_vec *labels) > > + auto_vec *labels, > > + location_t *prevloc) > > { > >gimple

Re: Fix PR86575

2018-11-14 Thread Marek Polacek
On Wed, Nov 14, 2018 at 02:51:45PM +, Michael Matz wrote: > Hi, > > our warning code sometimes adds locations to statement which didn't have > them before, which can in turn lead to code changes (here only label > numbers change). It seems better to not do that from warning code, and >

Re: Fix PR86575

2018-11-14 Thread Richard Biener
On Wed, Nov 14, 2018 at 3:51 PM Michael Matz wrote: > > Hi, > > our warning code sometimes adds locations to statement which didn't have > them before, which can in turn lead to code changes (here only label > numbers change). It seems better to not do that from warning code, and > here it's

Fix PR86575

2018-11-14 Thread Michael Matz
Hi, our warning code sometimes adds locations to statement which didn't have them before, which can in turn lead to code changes (here only label numbers change). It seems better to not do that from warning code, and here it's easy to do: just return the location we want to use for warnings,