[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #125648)

Urvi Rav via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 6 02:50:52 PST 2025


ravurvi20 wrote:

> Thank you for this patch. I wonder: was this spelling change introduced in 5.2? If so, does the compiler after this patch still support the 5.1 spelling when providing this as the OpenMP version (`-fopenmp-version=5.1`)

Yes, otherwise clause was introduced in OpenMP 5.2 version ([Metadirective](https://www.openmp.org/spec-html/5.2/openmpse45.html)). I have added a condition where, for OpenMP 5.2 or later, the compiler generates a warning for the default clause, while for OpenMP 5.1 and earlier, the default clause is accepted without warnings.


https://github.com/llvm/llvm-project/pull/125648


More information about the cfe-commits mailing list