<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 --- - [OpenMP] variable named like directive name modifier"
href="https://llvm.org/bugs/show_bug.cgi?id=31428">31428</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[OpenMP] variable named like directive name modifier
</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>All
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>trass3r@gmail.com
</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>Not sure if this code has become illegal with the newer OpenMP versions or if
it's a bug.
But the information should be conveyed in the error, not in a warning.
I usually have to disable -Wignored-pragmas in cl mode because of the many
msvc-specific pragmas in some codebases.
In general it would be nice to have a separate category for OpenMP or make it
errors right away.
struct A
{
int size() { return 1; }
};
int main()
{
A target;
#pragma omp parallel if(target.size() > 65535)
{
}
}
"C:\Program Files\LLVM\bin\clang.exe" -v -fopenmp -O2 -c test.cpp
clang version 4.0.0 (trunk 290097)
Target: x86_64-pc-windows-msvc
test.cpp:9:32: warning: missing ':' after directive name modifier - ignoring
[-Wignored-pragmas]
#pragma omp parallel if(target.size() > 65535)
^
test.cpp:9:32: error: expected expression
test.cpp:9:32: error: expected ')'
test.cpp:9:25: note: to match this '('
#pragma omp parallel if(target.size() > 65535)
^</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>