error messages with ranges

Richard Stallman rms@gnu.org
Sun Oct 18 08:51:00 GMT 2009


    FWIW, clang uses ranges for a lot of things other than arguments.

We already support ranges in error messages.  The issue here is to
include more than one range.  These two examples need only one:

    $ 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 =

However, my proposal is not limited to indicating the arguments.
It could be used to convey multiple ranges for any purpose.



More information about the Gcc-patches mailing list