diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-11-04 09:14:08 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-11-04 09:14:08 +0100 |
commit | 8067caa85d038bfec829b7e3bd6b82d34e562904 (patch) | |
tree | 1303615e3f3dde8f0a031fe25935ca9d3eaa72e4 /gcc/c/c-parser.h | |
parent | 40b9af020fc2842b4e22ae06742088815400631e (diff) | |
download | gcc-8067caa85d038bfec829b7e3bd6b82d34e562904.zip gcc-8067caa85d038bfec829b7e3bd6b82d34e562904.tar.gz gcc-8067caa85d038bfec829b7e3bd6b82d34e562904.tar.bz2 |
openmp: Add omp::decl support for C2X
This patch adds omp::decl support which has been added recently for
C++ also to C.
2023-11-04 Jakub Jelinek <jakub@redhat.com>
* c-parser.h (c_maybe_parse_omp_decl): Declare.
* c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
(c_parser_std_attribute): Uncoment omp::decl handling.
(c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
don't expect any arguments, instead create clause or TREE_LIST for
that decl.
(c_maybe_parse_omp_decl): New function.
(c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
first token isn't name or comma invoke c_parser_omp_var_list_parens.
* c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
use *node rather than non-existing *decl.
* gcc.dg/gomp/attrs-19.c: New test.
* gcc.dg/gomp/attrs-20.c: New test.
* gcc.dg/gomp/attrs-21.c: New test.
Diffstat (limited to 'gcc/c/c-parser.h')
-rw-r--r-- | gcc/c/c-parser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c/c-parser.h b/gcc/c/c-parser.h index f99d144..d6dca86 100644 --- a/gcc/c/c-parser.h +++ b/gcc/c/c-parser.h @@ -204,5 +204,6 @@ extern void c_parser_declspecs (c_parser *, struct c_declspecs *, bool, bool, bool, bool, bool, bool, bool, enum c_lookahead_kind); extern struct c_type_name *c_parser_type_name (c_parser *, bool = false); +extern bool c_maybe_parse_omp_decl (tree, tree); #endif |