On Oct 16, 2009, at 9:51 AM, Gabriel Dos Reis wrote:
On Fri, Oct 16, 2009 at 3:47 AM, Richard Stallman <[email protected]> wrote:
How about something like this:
exprs.c:47:15: error: invalid operands to binary expression
('int *' and '_Complex float')
::Argument locations: 47:8-47:14, 47:17-47:24
If the brace notation you've proposed becomes a de facto standard,
we may as well go along with it. But I think this proposal
is better intrinsically, since it is less clutter and no harder to
parse.
I like the non-braced version.
However, I would like you clarify the '::Argument locations:' marker.
Do you intend the double colons '::' as token to introduce
some form of meta data for tools? (In this case, it is to introduce
locus, but is it an escape for more general tags?)
FWIW, clang uses ranges for a lot of things other than arguments.
Here are some other examples:
$ clang -fsyntax-only t.c
t.c:12:8: error: called object type 'int' is not a function or
function pointer
(P-Q)();
~~~~~^
$ clang t.c
t.c:5:28: warning: use of GNU old-style field designator extension
struct point origin = { x: 0.0, y: 0.0 };
~~ ^
.x =
This is probably mangled by my email client, but you can see examples
as intended here:
http://clang.llvm.org/diagnostics.html
The brace sequence is not normally seen by humans, only by IDEs and
tools. It being terse and simple is important, but beauty is not very
important.
-Chris