This is the mail archive of the gcc-bugs@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]

[Bug c/85664] Don't ask questions if tere's no way to answer


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85664

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |manu at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Mysha from comment #2)
> I don't know how many more unanswerable questions there are in GCC, but
> reactions suggest that these informative messages with questions are not an
> option, but rather the normal output. In that case, I'd rather have --terse;
> just the error messages, not the informative additions. (I get a lot of
> these, and with four lines per error I run our of console lines after some
> 17 typos.)

Removing the questions do not save lines.

The suggestions are eminently useful when one cannot immediately see the typo,
remember the right wording of a type, the right header and many other cases.

If you don't like getting too many errors or verbose output, you can use
-fmax-errors=1 -fno-diagnostics-show-caret -fno-diagnostics-show-option.

However, we have also bug reports asking for messages to be more verbose. One
of the often-repeated selling points of the "competition" is that they have
"expressive diagnostics", while GCC diagnostics are (were!) terse and cryptic.
There are many bug reports about making them even more verbose:
https://gcc.gnu.org/wiki/VerboseDiagnostics

If using the console for software development is too cumbersome, a better
alternative is to invoke gcc from an IDE such as Emacs, where you can jump from
error to error, jump to the code in question, and maybe apply the suggested fix
if you agree with it.

> But for the direct case: While the other one also would like to see the
> wording changed, that one is about the verbosity; what I'm after are the
> questions. If there's no checksum in those files, I figure I can just
> hexedit them, but I'd prefer a proper solution to that.

I would suggest that it would be easier to create a wrapper for gcc and use sed
or perl to filter the questions from the output. A simple regex should do the
job beautifully.

In any case, if you think a diagnostic could be better worded but no one else
seems interested in putting the effort to do it, then
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps

*** This bug has been marked as a duplicate of bug 84890 ***

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