This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: messaging


2009/4/14 Kai Henningsen:
> aschwarz1309@verizon.net schrieb:
>>
>> Thanks Kai. I do have what I hope is a more specific subjective reason for
>> saying that I think the existing diagnostics should be changed.
>> Fundamentally, what is provided in the messaging is not an indication of
>> what is wrong, but an indication of what is required to repair the fault. My
>> objections then become:
>> 1: As an old man full of wisdom, most developers can't distinguish a
>> ? 'primary-expression' from a washing machine. Further, to determine
>
> Well, here I think that such people should perhaps put down the keyboard and
> back away from using the compiler slowly. That's about the same as driving a
> car without knowing what a stop sign means.
>
> At least if they're unable to infer that a primary expression is a kind of
> expression, and there's no expression between [ and ].

Even if they are utterly flummoxed by the term, the message points
pretty clearly to the exact spot within the line that is wrong, as
does the ':' message.  In those cases it should be good enough to
point to the position that causes a problem, and a
reasonably-proficient c++ developer will spot the typo (not every time
- we can all be blind to simple typos sometimes, but that's not the
compiler's problem.)  I don't think  the compiler can be expected to
help if the developer doesn't know the language well enough to tell
that the syntax is invalid once pointed to the location of the error.

There are cases where the location in the diagnostic is (seemingly)
unrelated to the cause, but neither of your examples is in that
category.

...

> And really, I *like* it when the compiler uses terms directly from the
> language standard, instead of inventing some other terms.

Agreed.  I'd want an 'expert mode' with precise terminology if those
diagnostics were changed.

Jonathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]