Avoid inclusion of "gomp-constants.h" in gcc/tree-core.h.
N2764 (from 2008) added syntax for declaring enums, however: "warning: scoped
enums only available with -std=c++11 or -std=gnu++11": in the C++ dialect
currently used by GCC, it is not possible to declare an enum without giving the
full list of enumerators. If it were possible to use this, we could add to
gcc/tree-core.h:
enum gomp_map_kind : unsigned char;
..., and keep using enum gomp_map_kind for gcc/tree-core.h's struct
tree_omp_clause's map_kind member, and this way decouple the declaration
(gcc/tree-core.h) from the actual "population of it"
(include/gomp-constants.h). Until switching GCC to C++11, we'll have to do as
follows:
gcc/
* tree-core.h: Don't include "gomp-constants.h".
(struct tree_omp_clause): Change type of map_kind member from enum
gomp_map_kind to unsigned char.
* tree.h (OMP_CLAUSE_MAP_KIND): Cast it to enum gomp_map_kind.
(OMP_CLAUSE_SET_MAP_KIND): New macro.
* gimplify.c (gimplify_adjust_omp_clauses_1)
(gimplify_adjust_omp_clauses): Use OMP_CLAUSE_SET_MAP_KIND.
* omp-low.c (oacc_initialize_reduction_data): Likewise.
* tree-nested.c (convert_nonlocal_reference_stmt)
(convert_local_reference_stmt, convert_gimple_call): Likewise.
* tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
Likewise.
gcc/c/
* c-parser.c (c_parser_oacc_data_clause)
(c_parser_oacc_data_clause_deviceptr, c_parser_omp_clause_map):
Use OMP_CLAUSE_SET_MAP_KIND.
* c-typeck.c (handle_omp_array_sections): Likewise.
gcc/cp/
* parser.c (cp_parser_oacc_data_clause)
(cp_parser_oacc_data_clause_deviceptr, cp_parser_omp_clause_map):
Use OMP_CLAUSE_SET_MAP_KIND.
* semantics.c (handle_omp_array_sections): Likewise.
gcc/fortran/
* trans-openmp.c (gfc_omp_finish_clause, gfc_trans_omp_clauses):
Use OMP_CLAUSE_SET_MAP_KIND.
gcc/
* lto-streamer-out.c: Include "gomp-constants.h".
* tree-streamer-in.c: Likewise.
* tree-streamer-out.c: Likewise.
gcc/lto/
* lto.c: Include "gomp-constants.h".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@219524 138bc75d-0d04-0410-961f-82ee72b054a4
18 files changed: