[llvm-bugs] [Bug 31428] New: [OpenMP] variable named like directive name modifier
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 19 05:31:51 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31428
Bug ID: 31428
Summary: [OpenMP] variable named like directive name modifier
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: trass3r at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
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)
^
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161219/36febc07/attachment-0001.html>
More information about the llvm-bugs
mailing list