https://bugs.llvm.org/show_bug.cgi?id=41768
Bug ID: 41768
Summary: OpenMP default(none) - std::cerr is not diagnosed as
"not specified in enclosing 'parallel'", unlike GCC
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangb...@nondot.org
Reporter: lebedev...@gmail.com
CC: llvm-bugs@lists.llvm.org
#include <iostream>
void test(int chunkSize) {
#pragma omp parallel default(none)
std::cerr << "hi";
}
clang accepts that code, gcc does not:
<source>: In function 'void test(int)':
<source>:4:18: error: 'cerr' not specified in enclosing 'parallel'
4 | std::cerr << "hi";
| ^~~~
<source>:3:9: error: enclosing 'parallel'
3 | #pragma omp parallel default(none)
| ^~~
Compiler returned: 1
https://godbolt.org/z/hC0cbC
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs