<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Multiple -isystem seems to add an include path like -I"
   href="https://llvm.org/bugs/show_bug.cgi?id=30382">30382</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Multiple -isystem seems to add an include path like -I
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>eric.chamberland@giref.ulaval.ca
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>adding multiple -isystem at command line seems to add the paths like "-I" does.

Reproducer:

mkdir bad && mkdir good && echo "#error this shall NEVER happens" > bad/foo.h
&& echo "//ok" > good/foo.h && echo '#include "foo.h"' > main.c

The bug:

clang -isystem ./bad -isystem ./good -I ./good -c main.c
In file included from main.c:1:
./bad/foo.h:1:2: error: this shall NEVER happens
#error this shall NEVER happens
 ^
1 error generated.

BUT, this compiles fine:

clang -isystem ./bad  -I ./good -c main.c

Eric</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>