public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument
@ 2022-05-11 11:41 redi at gcc dot gnu.org
2022-05-11 12:21 ` [Bug driver/105564] " marxin at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-11 11:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
Bug ID: 105564
Summary: Bad error for -ftrivial-auto-var-init without a choice
argument
Product: gcc
Version: 12.1.1
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
If you try to use the -ftrivial-auto-var-init option without an argument you
get a really unhelpful error:
g++: error: unrecognized command-line option '-ftrivial-auto-var-init'; did you
mean '-Wtrivial-auto-var-init'?
It should tell you the use one of the zero/pattern/uninitialized arguments.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug driver/105564] Bad error for -ftrivial-auto-var-init without a choice argument
2022-05-11 11:41 [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument redi at gcc dot gnu.org
@ 2022-05-11 12:21 ` marxin at gcc dot gnu.org
2022-05-11 12:25 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-11 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2022-05-11
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Yeah, taking look at it now..
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug driver/105564] Bad error for -ftrivial-auto-var-init without a choice argument
2022-05-11 11:41 [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument redi at gcc dot gnu.org
2022-05-11 12:21 ` [Bug driver/105564] " marxin at gcc dot gnu.org
@ 2022-05-11 12:25 ` jakub at gcc dot gnu.org
2022-05-11 13:51 ` marxin at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-11 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
-ftrivial-auto-var-init to -Wtrivial-auto-var-init is just a single letter
change, addition of trailing = is a single letter addition, so guess the
distance is the same and we just choose one. But perhaps we could special case
the missing trailing = if it the option is otherwise exact match.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug driver/105564] Bad error for -ftrivial-auto-var-init without a choice argument
2022-05-11 11:41 [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument redi at gcc dot gnu.org
2022-05-11 12:21 ` [Bug driver/105564] " marxin at gcc dot gnu.org
2022-05-11 12:25 ` jakub at gcc dot gnu.org
@ 2022-05-11 13:51 ` marxin at gcc dot gnu.org
2022-06-16 6:23 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-11 13:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> -ftrivial-auto-var-init to -Wtrivial-auto-var-init is just a single letter
> change, addition of trailing = is a single letter addition, so guess the
> distance is the same and we just choose one. But perhaps we could special
> case the missing trailing = if it the option is otherwise exact match.
Yep, and both have equal scores and we prefer the option that differs earlier
as was implemented in PR69968. But yes, I bet we can do special handling of
trailing equal sign.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug driver/105564] Bad error for -ftrivial-auto-var-init without a choice argument
2022-05-11 11:41 [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument redi at gcc dot gnu.org
` (2 preceding siblings ...)
2022-05-11 13:51 ` marxin at gcc dot gnu.org
@ 2022-06-16 6:23 ` cvs-commit at gcc dot gnu.org
2022-06-16 6:24 ` marxin at gcc dot gnu.org
2022-06-16 8:30 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-16 6:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:ab66fd016d8efa250c471692f826b07e4a55e237
commit r13-1128-gab66fd016d8efa250c471692f826b07e4a55e237
Author: Martin Liska <mliska@suse.cz>
Date: Wed May 11 16:07:25 2022 +0200
opts: improve option suggestion
In case where we have 2 equally good candidates like
-ftrivial-auto-var-init=
-Wtrivial-auto-var-init
for -ftrivial-auto-var-init, we should take the candidate that
has a difference in trailing sign symbol.
PR driver/105564
gcc/ChangeLog:
* spellcheck.cc (test_find_closest_string): Add new test.
* spellcheck.h (class best_match): Prefer a difference in
trailing sign symbol.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug driver/105564] Bad error for -ftrivial-auto-var-init without a choice argument
2022-05-11 11:41 [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument redi at gcc dot gnu.org
` (3 preceding siblings ...)
2022-06-16 6:23 ` cvs-commit at gcc dot gnu.org
@ 2022-06-16 6:24 ` marxin at gcc dot gnu.org
2022-06-16 8:30 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-06-16 6:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Resolved on master.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug driver/105564] Bad error for -ftrivial-auto-var-init without a choice argument
2022-05-11 11:41 [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument redi at gcc dot gnu.org
` (4 preceding siblings ...)
2022-06-16 6:24 ` marxin at gcc dot gnu.org
@ 2022-06-16 8:30 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-06-16 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105564
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Nice, thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-06-16 8:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 11:41 [Bug driver/105564] New: Bad error for -ftrivial-auto-var-init without a choice argument redi at gcc dot gnu.org
2022-05-11 12:21 ` [Bug driver/105564] " marxin at gcc dot gnu.org
2022-05-11 12:25 ` jakub at gcc dot gnu.org
2022-05-11 13:51 ` marxin at gcc dot gnu.org
2022-06-16 6:23 ` cvs-commit at gcc dot gnu.org
2022-06-16 6:24 ` marxin at gcc dot gnu.org
2022-06-16 8:30 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).