aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-10 09:07:30 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-10-10 09:07:30 +0200
commit94e7f906ca5c73fb79d21ec54733e9e75a96c2b4 (patch)
tree5f686002d13f0905df1681a9408a9d96b23ee258 /gcc/cp/parser.h
parent6ea20bd0218fd6386cef3701befa653cee6f1101 (diff)
downloadgcc-94e7f906ca5c73fb79d21ec54733e9e75a96c2b4.zip
gcc-94e7f906ca5c73fb79d21ec54733e9e75a96c2b4.tar.gz
gcc-94e7f906ca5c73fb79d21ec54733e9e75a96c2b4.tar.bz2
c-common.h (c_omp_check_context_selector, [...]): Declare.
c-family/ * c-common.h (c_omp_check_context_selector, c_omp_get_context_selector): Declare. * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling in diagnostic message. (c_omp_check_context_selector, c_omp_get_context_selector): New functions. * c-attribs.c (c_common_attribute_table): Add "omp declare variant" attribute. (handle_omp_declare_variant_attribute): New function. c/ * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if true, terminate processing on closing paren and don't skip to end of pragma line. (c_parser_omp_declare_simd): Handle also declare variant. (omp_construct_selectors, omp_device_selectors, omp_implementation_selectors, omp_user_selectors): New variables. (c_parser_omp_context_selector, c_parser_omp_context_selector_specification, c_finish_omp_declare_variant): New functions. (c_finish_omp_declare_simd): Handle both declare simd and declare variant. (c_parser_omp_declare): Handle declare variant. cp/ * parser.h (struct cp_omp_declare_simd_data): Add variant_p member. * parser.c (cp_ensure_no_omp_declare_simd): Handle both declare simd and declare variant. (cp_parser_oacc_all_clauses): Formatting fix. (cp_parser_omp_all_clauses): Add NESTED_P argument, if true, terminate processing on closing paren and don't skip to end of pragma line. (cp_parser_omp_declare_simd): Add VARIANT_P argument. Handle also declare variant. (omp_construct_selectors, omp_device_selectors, omp_implementation_selectors, omp_user_selectors): New variables. (cp_parser_omp_context_selector, cp_parser_omp_context_selector_specification, cp_finish_omp_declare_variant): New functions. (cp_parser_late_parsing_omp_declare_simd): Handle also declare variant. (cp_parser_omp_declare): Handle declare variant. testsuite/ * c-c++-common/gomp/declare-variant-1.c: New test. * c-c++-common/gomp/declare-variant-2.c: New test. * c-c++-common/gomp/declare-variant-3.c: New test. * g++.dg/gomp/this-1.C: Adjust for diagnostic message spelling fix. * gcc.dg/gomp/declare-variant-1.c: New test. * gcc.dg/gomp/declare-variant-2.c: New test. From-SVN: r276789
Diffstat (limited to 'gcc/cp/parser.h')
-rw-r--r--gcc/cp/parser.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h
index 2890788..91b5916 100644
--- a/gcc/cp/parser.h
+++ b/gcc/cp/parser.h
@@ -202,10 +202,11 @@ struct GTY (()) cp_parser_context {
};
-/* Helper data structure for parsing #pragma omp declare simd. */
+/* Helper data structure for parsing #pragma omp declare {simd,variant}. */
struct cp_omp_declare_simd_data {
bool error_seen; /* Set if error has been reported. */
bool fndecl_seen; /* Set if one fn decl/definition has been seen already. */
+ bool variant_p; /* Set for #pragma omp declare variant. */
vec<cp_token_cache_ptr> tokens;
tree clauses;
};