Avoid inclusion of "gomp-constants.h" in gcc/tree-core.h.
commit7dbb7ec6c08d604926fca30e105d2b6411cf73cb
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 2015 10:50:01 +0000 (13 10:50 +0000)
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 2015 10:50:01 +0000 (13 10:50 +0000)
tree496dd4935b5d106ba9a762aba15e6fb34164e16e
parent3421740e4c0b9262810d1c0b98f2b6c58623f868
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:
gcc/ChangeLog.gomp
gcc/c/ChangeLog.gomp
gcc/c/c-parser.c
gcc/c/c-typeck.c
gcc/cp/ChangeLog.gomp
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/fortran/trans-openmp.c
gcc/gimplify.c
gcc/lto-streamer-out.c
gcc/lto/ChangeLog.gomp
gcc/lto/lto.c
gcc/omp-low.c
gcc/tree-core.h
gcc/tree-nested.c
gcc/tree-streamer-in.c
gcc/tree-streamer-out.c
gcc/tree.h