Rework C/C++ OpenACC routine parsing
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 4 Aug 2016 13:35:30 +0000 (15:35 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Thu, 4 Aug 2016 13:35:30 +0000 (15:35 +0200)
commitae9281fc64aebd40fbe0ce1705c6ca0aaffdb0c4
tree9256ee4be3149ae56764735e8e4cd0392a65d11b
parent0b212d8c86eee4dd2b9b0c4c04ea4dd994e72682
Rework C/C++ OpenACC routine parsing

gcc/c/
* c-parser.c (struct oacc_routine_data): Add error_seen and
fndecl_seen members.
(c_finish_oacc_routine): Use these.
(c_parser_declaration_or_fndef): Adjust.
(c_parser_oacc_routine): Likewise.  Support more C language
constructs, and improve diagnostics.  Move pragma context
checking...
(c_parser_pragma): ... here.
gcc/cp/
* parser.c (cp_ensure_no_oacc_routine): Improve diagnostics.
(cp_parser_late_parsing_cilk_simd_fn_info): Fix diagnostics.
(cp_parser_late_parsing_oacc_routine, cp_finalize_oacc_routine):
Simplify code, and improve diagnostics.
(cp_parser_oacc_routine): Likewise.  Move pragma context
checking...
(cp_parser_pragma): ... here.
gcc/testsuite/
* c-c++-common/goacc/routine-5.c: Update.

From-SVN: r239128
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/goacc/routine-5.c