--- standards.texi.orig Fri Apr 5 15:47:18 2002 +++ standards.texi Fri Apr 5 15:46:36 2002 @@ -3,7 +3,7 @@ @setfilename standards.info @settitle GNU Coding Standards @c This date is automagically updated when you save this file: address@hidden lastupdate October 19, 2001 address@hidden lastupdate April 5, 2002 @c %**end of header @ifinfo @@ -34,7 +34,8 @@ @ifinfo GNU Coding Standards -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 @@ -52,7 +53,8 @@ @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 @@ -679,10 +681,11 @@ @end example @noindent -If you want to mention the column number, use this format: +If you want to mention the column number, use one of these formats: @example @var{source-file-name}:@var{lineno}:@var{column}: @var{message} address@hidden:@address@hidden: @var{message} @end example @noindent @@ -692,6 +695,26 @@ numbers assuming that space and all ASCII printing characters have equal width, and assuming tab stops every 8 columns. +You may support locations, as opposed to positions: describing the +location of an error by specifying its starting and ending positions. +Redundant information, such as a duplicate line number or one character +long ranges should be avoided. It results in the following possible +formats: + address@hidden address@hidden:@address@hidden@address@hidden: @var{message} address@hidden:@address@hidden@var{column-2}: @var{message} address@hidden:@address@hidden: @var{message} address@hidden:@address@hidden: @var{message} address@hidden example + address@hidden +When an error is spread over several files, you may use: + address@hidden address@hidden:@address@hidden@var{source-file-name-2}:@address@hidden: @var{message} address@hidden example + Error messages from other noninteractive programs should look like this: @example --- compile.el.orig Fri Apr 5 14:48:18 2002 +++ compile.el Fri Apr 5 15:35:51 2002 @@ -194,6 +194,33 @@ \\([a-zA-Z]?:?[^:( \t\n]*[^:( \t\n0-9][^:( \t\n]*\\)[:(][ \t]*\\([0-9]+\\)\ \\([) \t]\\|:\\(\\([0-9]+:\\)\\|[0-9]*[^:0-9]\\)\\)" 2 3 6) + ;; GNU utilities with precise locations (line and columns), + ;; possibly ranges: + ;; foo.c:8.23-9.1: error message + ("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)\ +\\([0-9]+\\)\\.\\([0-9]+\\)\ +-\\([0-9]+\\)\\.\\([0-9]+\\)\ +:" 1 2 3) ;; When ending points are supported, add line = 4 and col = 5. + ;; foo.c:8.23-45: error message + ("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)\ +\\([0-9]+\\)\\.\\([0-9]+\\)\ +-\\([0-9]+\\)\ +:" 1 2 3) ;; When ending points are supported, add line = 2 and col = 4. + ;; foo.c:8-45.3: error message + ("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)\ +\\([0-9]+\\)\ +-\\([0-9]+\\)\\.\\([0-9]+\\)\ +:" 1 2 nil) ;; When ending points are supported, add line = 2 and col = 4. + ;; foo.c:8.23: error message + ("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)\ +\\([0-9]+\\)\\.\\([0-9]+\\)\ +:" 1 2 3) + ;; foo.c:8-23: error message + ("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)\ +\\([0-9]+\\)\ +-\\([0-9]+\\)\ +:" 1 2 nil);; When ending points are supported, add line = 3. + ;; Microsoft C/C++: ;; keyboard.c(537) : warning C4005: 'min' : macro redefinition ;; d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if' @@ -2089,4 +2116,3 @@ (provide 'compile) ;;; compile.el ends here -