atmnpatel added inline comments.

================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5102
       Diag(P.second->getExprLoc(), diag::err_omp_no_dsa_for_variable)
           << P.first << P.second->getSourceRange();
       Diag(DSAStack->getDefaultDSALocation(), diag::note_omp_default_dsa_none);
----------------
fghanim wrote:
> Why is `firstprivate` throwing this error? isn't the purpose of specifying it 
> as `default` is if a variable is not specified as anything, then it is 
> automatically handled as `firstprivate`? or am I misunderstanding something?
My understanding is that if that line isn't there then errors won't be thrown 
in the special cases where firstprivate explicitly requires a data sharing 
attribute to be specified - such as for static variable within a 
namespace/global scope as per the C/C++ restrictions in the technical report.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75591/new/

https://reviews.llvm.org/D75591



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to