C/C++: Simplify handling of location information for OpenACC routine directives
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 4 Aug 2016 13:35:19 +0000 (15:35 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Thu, 4 Aug 2016 13:35:19 +0000 (15:35 +0200)
commit0b212d8c86eee4dd2b9b0c4c04ea4dd994e72682
tree3c902630f7e7db375d5643b09b8b06cf4c1a409d
parentbbc79c0e9ee0f8a3e6a2e0a4ec104d2b86e093b9
C/C++: Simplify handling of location information for OpenACC routine directives

gcc/c/
* c-parser.c (struct oacc_routine_data): New.
(c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
Simplify code.
(c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
declare target" attribute.
gcc/cp/
* parser.h (struct cp_omp_declare_simd_data): New.
(struct cp_parser): Use it for oacc_routine member.
* parser.c (cp_ensure_no_oacc_routine, cp_parser_oacc_routine)
(cp_parser_late_parsing_oacc_routine, cp_finalize_oacc_routine):
Use it.  Simplify code.
(cp_parser_new): Initialize all members pointing to special
parsing data structures.
(cp_parser_cilk_simd_fn_vector_attrs): Initialize
parser->cilk_simd_fn_info->clauses.
(cp_parser_omp_declare_simd): Initialize
parser->omp_declare_simd->clauses.
(cp_parser_late_parsing_omp_declare_simd): Simplify code.

From-SVN: r239127
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/parser.h