]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP: Pass a 3-way flag to omp_check_context_selector instead of a bool.
authorSandra Loosemore <sloosemore@baylibre.com>
Sun, 9 Feb 2025 21:34:35 +0000 (21:34 +0000)
committerSandra Loosemore <sloosemore@baylibre.com>
Tue, 11 Feb 2025 17:04:48 +0000 (17:04 +0000)
commit9a2116f91150cf872e7d4a66036a81ecd2526b48
tree6f67cd867fa8f9be7e664983b4345197ec61c00d
parent84854ce5b84c86aed23016de5ca05372bc7fa7cf
OpenMP: Pass a 3-way flag to omp_check_context_selector instead of a bool.

The OpenMP "begin declare variant" directive has slightly different
requirements for context selectors than regular "declare variant", so
something more than a bool is required to tell the error-checking routine
what to check.

gcc/ChangeLog
* omp-general.cc (omp_check_context_selector): Change
metadirective_p argument to a 3-way flag.  Add extra check for
OMP_CTX_BEGIN_DECLARE_VARIANT.
* omp-general.h (enum omp_ctx_directive): New.
(omp_check_context_selector): Adjust declaration.

gcc/c/ChangeLog
* c-parser.cc (c_finish_omp_declare_variant): Update call to
omp_check_context_selector.
(c_parser_omp_metadirective): Likewise.

gcc/cp/ChangeLog
* parser.cc (cp_finish_omp_declare_variant): Update call to
omp_check_context_selector.
(cp_parser_omp_metadirective): Likewise.

gcc/fortran/ChangeLog
* trans-openmp.cc (gfc_trans_omp_declare_variant): Update call to
omp_check_context_selector.
(gfc_trans_omp_metadirective): Likewise.
gcc/c/c-parser.cc
gcc/cp/parser.cc
gcc/fortran/trans-openmp.cc
gcc/omp-general.cc
gcc/omp-general.h