Here is a new version of my context selector implementation cleanup patch set, incorporating comments from Tobias on V2 of part 3. Parts 1 and 2 are unchanged from V1 except that I rebased them so they should apply cleanly to mainline head now. There's a new part 4 that adds new functionality, handling the additional properties Tobias asked for.
The part 3 changes from V2 are primarily in making the front ends pass through a marker for unknown selectors to later processing, instead of ignoring them completely; anything that contains these unknown selectors then fails to match. As Tobias suggested, I also changed the front ends to uniformly warn about any unknown selector; previously it either gave no diagnostic at all or gave an error, depending on the selector set. To get this to work in the Fortran front end, I moved the mapping from strings to the new enums to the parse phase instead of the translate phase, where I'd had it before. I think this is a cleaner design anyway as it allows getting rid of the duplicate set of allowed names in the Fortran front end and sharing the same tables used everywhere else. -Sandra Sandra Loosemore (4): OpenMP: Introduce accessor macros and constructors for context selectors. OpenMP: Unify representation of name-list properties. OpenMP: Use enumerators for names of trait-sets and traits OpenMP: Permit additional selector properties gcc/c/c-parser.cc | 205 ++--- gcc/cp/decl.cc | 8 +- gcc/cp/parser.cc | 205 ++--- gcc/cp/pt.cc | 93 ++- gcc/fortran/gfortran.h | 20 +- gcc/fortran/openmp.cc | 189 ++--- gcc/fortran/trans-openmp.cc | 66 +- gcc/gimplify.cc | 17 +- gcc/omp-general.cc | 778 +++++++++++------- gcc/omp-general.h | 66 +- gcc/omp-selectors.h | 93 +++ .../c-c++-common/gomp/declare-variant-1.c | 1 + .../c-c++-common/gomp/declare-variant-2.c | 44 +- .../gfortran.dg/gomp/declare-variant-1.f90 | 1 + .../gfortran.dg/gomp/declare-variant-2.f90 | 34 +- .../gfortran.dg/gomp/declare-variant-2a.f90 | 4 +- 16 files changed, 1015 insertions(+), 809 deletions(-) create mode 100644 gcc/omp-selectors.h -- 2.31.1