omp-general.c (omp_context_name_list_prop): New function.
* omp-general.c (omp_context_name_list_prop): New function.
(omp_context_selector_matches): Use it. Return 0 if it returns
NULL.
(omp_context_selector_props_compare): Allow equivalency of an
identifier and a string literal containing no embedded zeros.
c-family/
* c-omp.c (c_omp_check_context_selector): Handle name lists
containing string literals. Don't diagnose atomic_default_mem_order
with multiple props.
c/
* c-parser.c (c_parser_omp_context_selector): Rename
CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
and string literals.
cp/
* parser.c (cp_parser_omp_context_selector): Rename
CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
and string literals.
* pt.c (tsubst_attribute): Fix up STRING_CST handling if allow_string.
testsuite/
* c-c++-common/gomp/declare-variant-2.c: Adjust expected diagnostics,
add a test for atomic_default_mem_order with a string literal.
* c-c++-common/gomp/declare-variant-3.c: Use string literal props
in a few random places, add a few string literal prop related tests.
* c-c++-common/gomp/declare-variant-8.c: Likewise.
* c-c++-common/gomp/declare-variant-9.c: Use string literal props
in a few random places.
* c-c++-common/gomp/declare-variant-10.c: Likewise.
* c-c++-common/gomp/declare-variant-11.c: Likewise.
* c-c++-common/gomp/declare-variant-12.c: Likewise.
* g++.dg/gomp/declare-variant-7.C: Likewise.
From-SVN: r278202
18 files changed: