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

#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

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to