[cfe-dev] numbered warnings & errors?

Renato Golin rengolin at systemcall.org
Fri Dec 25 03:28:56 PST 2009


2009/12/24 Daniel Dunbar <daniel at zuster.org>:
> I'm also curious about alternate approaches which don't rely on
> exposing a stable name to the user (for example, by having the
> compiler embed some of the documentation, which could then have a
> verbose link to more information -- it would still be keyed by some
> number + version, but not in a way that needs to be stable).

Hi Daniel.

I've used codes to determine error traces as well, when one condition
caused the other. So, for instance, if you have a tokenizer error
causing a parser error, or a lexical or syntax error, you can trace
what's really going on. A header with the error codes could make it
easier to google for it, too.

ERROR: Sema21-Tok12 (semantic analysis failed because tokenizer got EOF)

The problem with context help is that, especially in compilers, there
could be multiple causes to a specific problem and each could have
multiple fixes. Printing them out on the console would clutter a lot,
not to mention formatting that text...

Maybe, if the console supports hypertext (more likely on IDEs), you
could embed links and put the documentation online. When it's not
supported, you could print small hashes that would be redirected to
the right page when the user puts in their browsers
(firefox+google-feeling-lucky would do the trick).

cheers,
--renato

http://systemcall.org/

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm



More information about the cfe-dev mailing list