]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Adjust handling of __has_attribute (omp::directive)/sequence and add omp...
authorJakub Jelinek <jakub@redhat.com>
Sun, 5 Nov 2023 17:28:37 +0000 (18:28 +0100)
committerJakub Jelinek <jakub@redhat.com>
Sun, 5 Nov 2023 17:28:37 +0000 (18:28 +0100)
commit26cf06941631c86200ac9050774072531477ef68
tree7ea4e56629c65179277091a7eaa7cf6e8b0edc78
parent0e6f3e9175bddb5cada6571744f33af574232c76
openmp: Adjust handling of __has_attribute (omp::directive)/sequence and add omp::decl

I forgot to tweak c_common_has_attribute for the C++ omp::decl addition and now
also for the C omp::{directive,sequence,decl} addition.

2023-11-05  Jakub Jelinek  <jakub@redhat.com>

* c-lex.cc (c_common_has_attribute): Return 1 for omp::directive
and omp::sequence with -fopenmp or -fopenmp-simd also for C, not
just for C++.  Return 1 for omp::decl with -fopenmp or -fopenmp-simd
for both C and C++.

* c-c++-common/gomp/attrs-1.c: Adjust for omp::directive and
omp::sequence being supported also in C and add tests for omp::decl.
* c-c++-common/gomp/attrs-2.c: Likewise.
* c-c++-common/gomp/attrs-3.c: Add tests for omp::decl.
gcc/c-family/c-lex.cc
gcc/testsuite/c-c++-common/gomp/attrs-1.c
gcc/testsuite/c-c++-common/gomp/attrs-2.c
gcc/testsuite/c-c++-common/gomp/attrs-3.c