<html>
<head>
<base href="http://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 --- - Incorrect handling of /openmp- compiler option in --drive-mode=cl mode."
href="http://llvm.org/bugs/show_bug.cgi?id=22748">22748</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect handling of /openmp- compiler option in --drive-mode=cl mode.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>eremeev@viva64.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>We were using a 3.5 clang for preprocessing of C/C++ source files intended for
Visual C++ cl.exe compiler. For this, we were utilizing a '--drive-mode=cl',
which should automatically interchange cl compiler options to their gcc/clang
analogs.
Now, several flags, such as '/openmp', for example, are unused by clang, so the
warning is generated. But it seems that '--drive-mode=cl' is unaware of
'/openmp-' option. In 3.5, it is still treated as an unknow option '/o penmp-'.
But, in the current trunk (3.7), the preprocessor starts treating '/openmp-' as
the output (-o) option of gcc/clang. This has some unforeseen consequences, as
we use clang for preprocessing and we are expecting it to behave like cl when
'--drive-mode=cl' is enabled - that is, starting
clang --driver-mode=cl /openmp- /P hello.cpp
We expect the preprocessed file (hello.i) to be generated in the current
directory. But, as the current trunk treat the '/openmp-' as /o penmp-, instead
we get the 'penmp-.i' file as the output of the preprocessor, which is
unexpected and incorrect from the cl.exe point of view.</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>