[cfe-dev] [CLang] Suggestion : reference to the standard on error
cppljevans at suddenlink.net
Tue Oct 18 16:06:59 PDT 2011
On 10/18/11 17:16, Klaim - Joël Lamotte wrote:
> The idea would be to add references to paragraphs of the language standard.
> I got his idea while reading the answers of this question
> : http://stackoverflow.com/questions/7801228/can-i-specialize-a-class-template-with-an-alias-template
> 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
> <http://stackoverflow.com> that have to refer to the standards to
> explain some ambiguous cases, like when undefined behavior will occur.
> 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?
I've seen this on an ADA compiler around 15yrs ago. I found it very
useful that the error message pointed to a specific paragraph or section
or whatever in the ADA standard.
Sorry, I don't recall the vendor,
More information about the cfe-dev