OpenMP 5.2 (GNU libgomp)

### 2.4 OpenMP 5.2 ¶

#### New features listed in Appendix B of the OpenMP specification ¶

Description | Status | Comments
--- | --- | ---
`omp_in_explicit_task` routine and explicit-task-var ICV | Y |
`omp`/`ompx`/`omx` sentinels and `omp_`/`ompx_` namespaces | N/A | warning for `ompx/omx` sentinels1
Clauses on `end` directive can be on directive | Y |
`destroy` clause with destroy-var argument on `depobj` | Y |
Deprecation of no-argument `destroy` clause on `depobj` | N/A | undeprecated in OpenMP 6
`linear` clause syntax changes and `step` modifier | Y |
Deprecation of minus operator for reductions | Y |
Deprecation of separating `map` modifiers without comma | Y |
`declare mapper` with iterator and `present` modifiers | N |
If a matching mapped list item is not found in the data environment, the pointer retains its original value | Y |
New `enter` clause as alias for `to` on declare target directive | Y |
Deprecation of `to` clause on declare target directive | Y |
Extended list of directives permitted in Fortran pure procedures | Y |
New `allocators` directive for Fortran | Y |
Deprecation of `allocate` directive for Fortran allocatables/pointers | Y |
Optional paired `end` directive with `dispatch` | Y |
New `memspace` and `traits` modifiers for `uses_allocators` | P | Only predefined allocators
Deprecation of traits array following the allocator_handle expression in `uses_allocators` | Y |
New `otherwise` clause as alias for `default` on metadirectives | Y |
Deprecation of `default` clause on metadirectives | Y | Both `otherwise` and `default` are accepted without diagnostics.
Deprecation of delimited form of `declare target` | Y |
Reproducible semantics changed for `order(concurrent)` | N |
`allocate` and `firstprivate` clauses on `scope` | Y |
`ompt_callback_work` | N |
Default map-type for the `map` clause in `target enter/exit data` | Y |
New `doacross` clause as alias for `depend` with `source`/`sink` modifier | Y |
Deprecation of `depend` with `source`/`sink` modifier | Y |
`omp_cur_iteration` keyword | Y |

#### Other new OpenMP 5.2 features ¶

Description | Status | Comments
--- | --- | ---
For Fortran, optional comma between directive and clause | N |
Conforming device numbers and `omp_initial_device` and `omp_invalid_device` enum/PARAMETER | Y |
Initial value of default-device-var ICV with `OMP_TARGET_OFFLOAD=mandatory` | Y |
`all` as implicit-behavior for `defaultmap` | Y |
interop_types in any position of the modifier list for the `init` clause of the `interop` construct | Y |
Invoke virtual member functions of C++ objects created on the host device on other devices | N |
`mapper` as map-type modifier in `declare mapper` | N |

#### Footnotes

##### (1)

The `ompx` sentinel as C/C++ pragma and C++ attributes are warned for with `-Wunknown-pragmas` (implied by `-Wall`) and `-Wattributes` (enabled by default), respectively; for Fortran free-source code, there is a warning enabled by default and, for fixed-source code, the `omx` sentinel is warned for with `-Wsurprising` (enabled by `-Wall`). Unknown clauses are always rejected with an error.