Hi,

This is a patch to standards.texi to specify error messages with
multiple ranges. Currently, Clang implements this [1] and GCC would
like to implement it too [2].

Cheers,

 Manuel.


[1] http://clang.llvm.org/docs/UsersManual.html#cl_diagnostics (option
-f[no-]diagnostics-print-source-range-info)

[2] http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00201.html


2009-10-10  Manuel López-Ibáñez <[email protected]>

 * standard.texi (Error Messages): Describe error ranges.
diff -Naurp standards-orig/standards.texi standards/standards.texi
--- standards-orig/standards.texi	2009-04-17 00:46:07.000000000 +0200
+++ standards/standards.texi	2009-10-10 13:35:31.000000000 +0200
@@ -3,7 +3,7 @@
 @setfilename standards.info
 @settitle GNU Coding Standards
 @c This date is automagically updated when you save this file:
-...@set lastupdate April 16, 2009
+...@set lastupdate October 10, 2009
 @c %**end of header
 
 @dircategory GNU organization
@@ -760,6 +760,16 @@ When an error is spread over several fil
 @var{file-1}:@var{lineno-...@var{column-1}-@var{file-2}:@var{lineno-...@var{column-2}: @var{message}
 @end example
 
+...@noindent
+When an error message mentions several ranges of positions within one
+file, you can specify each range within braces. For example, the
+following specifies one error position and two ranges within the same
+file:
+
+...@example
+...@var{file-1}:@var{lineno-1}:@var{column-1}:@{...@var{lineno-2}:@var{column-...@var{lineno-3}:@var{column...@}@{...@var{lineno-4}:@var{column-...@var{lineno-5}:@var{column...@}: @var{message}
+...@end example
+
 Error messages from other noninteractive programs should look like this:
 
 @example

Reply via email to