Re: [Patch] C++: reject OpenMP directives in constexpr functions

2024-12-13 Thread Jakub Jelinek
On Fri, Dec 13, 2024 at 01:15:36PM +0100, Tobias Burnus wrote: > OpenMP states for C++: > > "Directives may not appear in constexpr functions or in constant expressions." > > There is some support for this already in GCC, but not for [[omp::decl]]-type > of directives and it also doesn't work tha

[Patch] C++: reject OpenMP directives in constexpr functions

2024-12-13 Thread Tobias Burnus
OpenMP states for C++: "Directives may not appear in constexpr functions or in constant expressions." There is some support for this already in GCC, but not for [[omp::decl]]-type of directives and it also doesn't work that well. For the example, for the newly added testcase, the result with the