Re: [C++ Patch] Fix some simple location issues​ (2)

2016-06-14 Thread Jason Merrill
OK. Jason

[C++ Patch] Fix some simple location issues​ (2)

2016-06-10 Thread Paolo Carlini
Hi, yesterday I noticed a case, a variant of testcase array43.C which I had just committed, where using EXPR_LOR_OR_LOC (init, input_location) actually made a difference because init had an usable location. The patchlet represents also a nano clean-up/fix-up: elsewhere in the same function EX

Re: [C++ Patch] Fix some simple location issues

2016-06-08 Thread Jason Merrill
OK. Jason

Re: [C++ Patch] Fix some simple location issues

2016-06-07 Thread Paolo Carlini
Hi, On 07/06/2016 21:40, Jason Merrill wrote: For diagnostics about an initializer, I think it would be better to give the location of the initializer rather than the declaration. Maybe use location_t loc = EXPR_LOC_OR_LOC (init, DECL_SOURCE_LOCATION (decl)); Now that you are telling me this

Re: [C++ Patch] Fix some simple location issues

2016-06-07 Thread Jason Merrill
For diagnostics about an initializer, I think it would be better to give the location of the initializer rather than the declaration. Maybe use location_t loc = EXPR_LOC_OR_LOC (init, DECL_SOURCE_LOCATION (decl)); ? Jason

[C++ Patch] Fix some simple location issues

2016-06-07 Thread Paolo Carlini
Hi, in parallel with other work, I'm auditing the front-end for simple location issues which can be fixed immediately. These I noticed in decl.c over the last couple of days. Slightly more interesting, for some error messages we didn't seem to have testcases, certainly not in g++.dg, thus I a