Two related issues about section "4.4 Formatting Error Messages"
(https://www.gnu.org/prep/standards/html_node/Errors.html):

(1) "The error message can also give both the starting and ending positions of the 
erroneous text."

This is ambiguous wrt respect to whether end positions are exclusive or 
inclusive.
In most APIs I'm familiar that talk about ranges (such as a substring function), an 
"end position"
is exclusive (but is zero-based).  However, it seems clear to me that we want 
*inclusive* ranges;
one reason is that otherwise you would never have a duplicate line numbers.

Perhaps a sentence of the form:
  End positions are inclusive.  For example an unknown identifier 'abc' in the 
first 3 characters
  of the first line could be reported as:

  foo.c:1.1-3: unknown identifier 'abc'

(2) Is colon or period preferred as the separator between a line number and a 
column number?
The first mention of column numbers allows either. When talking about ranges 
(end positions),
only period is allowed.  The last example only uses colon.
--
        --Per Bothner
[email protected]   http://per.bothner.com/

Reply via email to