[Openmp-commits] [PATCH] D105648: [OpenMP] Support OpenMP 5.1 attributes

Erich Keane via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 8 12:26:22 PDT 2021


erichkeane added inline comments.


================
Comment at: clang/lib/Parse/ParseDeclCXX.cpp:4285
+    // created for us by the caller.
+    return true;
+  }
----------------
ABataev wrote:
> erichkeane wrote:
> > aaron.ballman wrote:
> > > erichkeane wrote:
> > > > Another place to make the same comment :D  I wonder if giving a diagnostic on attempting to use omp::directive in a previous version should have either an extension warning or more explicit warning would be a good idea?
> > > Ah, now I see what you're after. We could do that, but I think deciding whether to expose this in older modes is more of an open question. I went with the conservative approach first, but we could relax this later.
> > Well, I was going for 1 of two things:
> > 
> > 1- allow in older modes, then do a warning that you're using it in the wrong version.
> > 
> > 2- Customize the error from "unknown attribute directive" to something like, "attribute omp::directive is only available in OMP5.1 mode".
> I think we can enable it for the previous versions, at least as an extension. Thoughts?
It'll mean a larger test-surface I'd think, but there _IS_ precedent both ways.  
IMO, we are probably better off doing #2 above (a better 'unknown attribute' diagnostic), then doing it as an extension if GCC makes that choice, or there is a compelling reaosn.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105648



More information about the Openmp-commits mailing list