On 04/26/2017 01:57 PM, Jakub Jelinek wrote: > On Wed, Apr 26, 2017 at 01:48:03PM +0200, Tom de Vries wrote: >> [ reposting with patch removed, was too big for gcc-patches@ ] > > I see in various tests you've ended up with ... { target ... } . } > I think it would be better to just use ... { target ... } } > in that case, . is the default, and if target is *-*-*, also remove the { > target ... }. > I've written sed commands for both simplifications, untested patches attached. [ I suppose we could drop an empty comment as the last argument as well. { ... "" }. ] > Are there any spots where the relative line number is with too big bias > (say .+10 or .-10 and more)? In the original patch, which rewrote all absolute line numbers, yes, it generated -62 ( and Mike commented on that here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221#c6 ). In the committed patch, no. The greatest relative line number magnitude was 6. The script was limited to rewrite only dg directives with -1 .. +1 relative line number, and adjacent directives referring to the same line. Thanks, - Tom > I guess those should be decided case by case > whether we want relative, absolute or saved line numbers. If the > diagnostic is within the same function or code block as the stuff it is > relative to, relative is fine, but if e.g. the messages are just at the end > of file and there are unrelated functions in between, it is not a good idea > to use relative. > > Jakub >