[Bug driver/69361] Nonsensical suggestion for misspelled command-line option "-help"

2017-01-17 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69361

David Malcolm  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from David Malcolm  ---
More recent gcc (e.g. today's) is saner:

$ gcc -help
gcc: error: unrecognized command line option ‘-h’
gcc: fatal error: no input files
compilation terminated.

In particular, it doesn't print the bogus suggestion, presumably due to
r242965.

Closing this one out.

[Bug driver/69361] Nonsensical suggestion for misspelled command-line option "-help"

2016-01-19 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69361

--- Comment #2 from David Malcolm  ---
Notes to self:

Trying to locate the "-h" option.

grep -nH -e "^h" *.opt
common.opt:2759:h

which is:

  h
  Driver Joined Separate

it was added in r166155 (37ef985f35a963f06b8112872899cb9d6811969)
which suggests it's a shorthand for --soname on FreeBSD.

[Bug driver/69361] Nonsensical suggestion for misspelled command-line option "-help"

2016-01-19 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69361

--- Comment #3 from David Malcolm  ---
(gdb) p switches[1]
$6 = {part1 = 0x53419d "h", args = 0x7dde70, live_cond = 0, known = true,
validated = false, ordering = false}

So "-h" is "known", but not "validated", but
driver::handle_unrecognized_options uses "validated".

[Bug driver/69361] Nonsensical suggestion for misspelled command-line option "-help"

2016-01-19 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69361

David Malcolm  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-01-19
 Ever confirmed|0   |1

[Bug driver/69361] Nonsensical suggestion for misspelled command-line option "-help"

2016-01-19 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69361

--- Comment #1 from David Malcolm  ---
Similarly:

$ gcc -h foo
gcc: error: unrecognized command line option ‘-h’; did you mean ‘-h’?
gcc: fatal error: no input files
compilation terminated.