[cfe-dev] [CLang] Suggestion : reference to the standard on error

Klaim - Joël Lamotte mjklaim at gmail.com
Tue Oct 18 15:16:12 PDT 2011


Here is a suggestion that unfortunately I will not be able to try to
implement, but maybe someone around here would like to consider it.
It's not a critical nor really needed feature but I think it might be very

The idea would be to add references to paragraphs of the language standard.

I got his idea while reading the answers of this question :
In that answer there is a very clear error log from CLang (yeah clang!) then
the writer had to add references to the standard to explicitly state what is
allowed or not.

1. Allowing the compiler to provide some additional references to the
standard would greatly help C++ programmers who cares about this kind of
You can see a lot of answers on stackoverflow.com that have to refer to the
standards to explain some ambiguous cases, like when undefined behavior will
I think that when (not if, it seems) the C++11 standard will be available to
anyone for cheap, it will help spreading knowledge about correct and
portable C++.

I suggest to make it a plugin or flag or something very optional.

2. Maybe even citing the standard document would even be more useful, but
would make some errors very verbose.
I think that if it's an interesting option too, but might require that the
standard document is provided in textual (unicode) format.
It would also be a very optional feature.

I'm not sure this feature will be really useful, but maybe it will? What do
you think?

Thanks for your time.

Joël Lamotte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111019/c48ac93a/attachment.html>

More information about the cfe-dev mailing list