]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Add C++ support for parsing metadirectives
authorKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 25 Jan 2022 19:01:53 +0000 (11:01 -0800)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 28 Jun 2022 20:53:28 +0000 (13:53 -0700)
commit7c353f46fb231c5f1bf9c05c80a4e2bd43ef30a3
tree4ad49b6fafb465fb07cb947e1c8eab53b38d4612
parent568a9a64df46cc04266b6c0b584b9b90cd90d2bb
openmp: Add C++ support for parsing metadirectives

This adds support for parsing OpenMP metadirectives in the C++ front end.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/cp/
* parser.cc (cp_parser_skip_to_end_of_statement): Handle parentheses.
(cp_parser_skip_to_end_of_block_or_statement): Likewise.
(cp_parser_omp_context_selector): Add extra argument.  Allow
non-constant expressions.
(cp_parser_omp_context_selector_specification): Add extra argument and
propagate to cp_parser_omp_context_selector.
(analyze_metadirective_body): New.
(cp_parser_omp_metadirective): New.
(cp_parser_omp_construct): Handle PRAGMA_OMP_METADIRECTIVE.
(cp_parser_pragma): Handle PRAGMA_OMP_METADIRECTIVE.
gcc/cp/ChangeLog.omp
gcc/cp/parser.cc