Re: [RFA jit] initialize input_location

2014-03-24 Thread David Malcolm
On Mon, 2014-03-24 at 05:29 -0600, Tom Tromey wrote: > > > "Dave" == David Malcolm > > writes: > > Dave> Given this declaration in input.c: > Dave> location_t input_location; > Dave> then assigning 0 is a faithful way of resetting it to its initial state. > > Dave> That said, "0" fee

Re: [RFA jit] initialize input_location

2014-03-24 Thread Tom Tromey
> "Dave" == David Malcolm > writes: Dave> Given this declaration in input.c: Dave> location_t input_location; Dave> then assigning 0 is a faithful way of resetting it to its initial state. Dave> That said, "0" feels like a magic number. Would it better to assign Dave> UNKNOWN_LOCATIO

Re: [RFA jit] initialize input_location

2014-03-21 Thread David Malcolm
On Thu, 2014-03-20 at 08:53 -0600, Tom Tromey wrote: > This patch initializes input_location at the same spot where the line > table is initialized. Without this, it's possible to crash when > emitting a diagnostic in a reinvocation of the compiler, because > input_location refers to a location th

[RFA jit] initialize input_location

2014-03-20 Thread Tom Tromey
This patch initializes input_location at the same spot where the line table is initialized. Without this, it's possible to crash when emitting a diagnostic in a reinvocation of the compiler, because input_location refers to a location that is no longer valid. --- gcc/ChangeLog.jit | 4 gcc/t