<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Confusing error message for unknown argument"
   href="https://bugs.llvm.org/show_bug.cgi?id=48880">48880</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Confusing error message for unknown argument
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>llvm-symbolizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jh7370.2008@my.bristol.ac.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Recently, llvm-symbolizer stopped supporting `-i=0` as an option for disabling
the -i option (which is enabled by default), in favour of a different option. I
forgot about this temporarily, and tried to use the old-style option, and got
the following result:

PS C:\Work\TempWork> C:\llvm\build\Debug\bin\llvm-symbolizer.exe --obj=foo.elf
0x100 -i=0
error: unknown argument '-=0'

Note the lack of the "i" in the output. My suspicion is that because `-i` is a
groupable option, it is removed from the list of unknown characters (because it
is recognised) and the rest are reported. However, the error message is
somewhat confusing, especially for people who might not be aware of the
behaviour change. 

Some more interesting examples show that it is all characters after the first
unknown character that gets reported:

PS C:\Work\TempWork> C:\llvm\build\Debug\bin\llvm-symbolizer.exe --obj=foo.elf
0x100 -ix=0
error: unknown argument '-x=0'
PS C:\Work\TempWork> C:\llvm\build\Debug\bin\llvm-symbolizer.exe --obj=foo.elf
0x100 -ixf=0
error: unknown argument '-xf=0'
PS C:\Work\TempWork> C:\llvm\build\Debug\bin\llvm-symbolizer.exe --obj=foo.elf
0x100 -ifx=0
error: unknown argument '-x=0'

We should fix this (it's likely an issue in the command-line library).</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>