]> gcc.gnu.org Git - gcc.git/commit
OpenMP: Improve C/C++ parsing error message [PR109999]
authorTobias Burnus <tobias@codesourcery.com>
Tue, 30 May 2023 10:49:09 +0000 (12:49 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 30 May 2023 10:49:09 +0000 (12:49 +0200)
commita899401404186843f38462c8fc9de733f19ce864
treec28e69f608d1f7758d9a72497844c816a5a048be
parent32a0266cc54a404007fca0d44dc9a299bbe70c1f
OpenMP: Improve C/C++ parsing error message [PR109999]

Replace
  error: expected '#pragma omp' clause before ...
by the the more readable/clearer
  error: expected an OpenMP clause before ...

(And likewise for '#pragma acc' and OpenACC.)

PR c/109999

gcc/c/ChangeLog:

* c-parser.cc (c_parser_oacc_all_clauses,
c_parser_omp_all_clauses): Improve error wording.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_oacc_all_clauses,
cp_parser_omp_all_clauses): Improve error wording.

gcc/testsuite/ChangeLog:

* c-c++-common/goacc/asyncwait-1.c: Update dg-error.
* c-c++-common/goacc/clauses-fail.c: Likewise.
* c-c++-common/goacc/data-2.c: Likewise.
* c-c++-common/gomp/declare-target-2.c: Likewise.
* c-c++-common/gomp/directive-1.c: Likewise.
* g++.dg/goacc/data-1.C: Likewise.
gcc/c/c-parser.cc
gcc/cp/parser.cc
gcc/testsuite/c-c++-common/goacc/asyncwait-1.c
gcc/testsuite/c-c++-common/goacc/clauses-fail.c
gcc/testsuite/c-c++-common/goacc/data-2.c
gcc/testsuite/c-c++-common/gomp/declare-target-2.c
gcc/testsuite/c-c++-common/gomp/directive-1.c
gcc/testsuite/g++.dg/goacc/data-1.C
This page took 0.065374 seconds and 6 git commands to generate.