[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Warning message issued with no source line number [PATCH]
From: |
arnold |
Subject: |
Re: [bug-gawk] Warning message issued with no source line number [PATCH] |
Date: |
Fri, 19 May 2017 07:40:10 -0600 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
> > Andy - does this look OK to you to commit?
>
> It seems fine, although I do have 2 questions/comments:
>
> 1. It says:
>
> + if (line == 0 && ip->source_line != 0)
> + line = ip->source_line;
>
> So once "line" is set, it won't change. That gives a preference for the
> a line value at the front of the list. Is that better than:
>
> + if (ip->source_line != 0)
> + line = ip->source_line;
>
> which would prefer the back of the list?
My thought was to prefer the actual expression if it has a line
number, but to default to the line where the expression or statement
begins if not.
> I have no idea, but if I had done it, I would have guessed that the back
> of the list should be preferred, since we scan until the back.
It might be better to do it your way, in which case the line is
closer to where the expression occurs.
> 2. I would have put the "line" variable inside the scope of the "if"
> statement, but that's basically a cosmetic decision.
Probably a good idea. I'll likely push a patch early next week.
Thanks,
Arnold
- [bug-gawk] Warning message issued with no source line number, Peter J. Farley III, 2017/05/16
- Re: [bug-gawk] Warning message issued with no source line number, Andrew J. Schorr, 2017/05/16
- Re: [bug-gawk] Warning message issued with no source line number, Peter J. Farley III, 2017/05/16
- Re: [bug-gawk] Warning message issued with no source line number, Andrew J. Schorr, 2017/05/16
- Re: [bug-gawk] Warning message issued with no source line number, Peter J. Farley III, 2017/05/16
- Re: [bug-gawk] Warning message issued with no source line number [PATCH], Andrew J. Schorr, 2017/05/17
- Re: [bug-gawk] Warning message issued with no source line number [PATCH], Arnold Robbins, 2017/05/19
- Re: [bug-gawk] Warning message issued with no source line number [PATCH], Andrew J. Schorr, 2017/05/19
- Re: [bug-gawk] Warning message issued with no source line number [PATCH],
arnold <=