https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101297

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:2ca89394280da4afad6074ec3cb7136b6142af7b

commit r12-1990-g2ca89394280da4afad6074ec3cb7136b6142af7b
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Jul 2 21:57:24 2021 +0200

    openmp: Reject #pragma omp atomic update, [PR101297]

    I've noticed that we allow a trailing comma on OpenMP atomic construct
    if there is at least one clause.  Commas should be only allowed to
    separate the clauses (or in OpenMP 5.1 to separate directive name
    from the clauses).

    2021-07-02  Jakub Jelinek  <ja...@redhat.com>

            PR c/101297
            * c-parser.c (c_parser_omp_atomic): Consume comma only if it
            appears before a CPP_NAME.

            * parser.c (cp_parser_omp_atomic): Consume comma only if it
            appears before a CPP_NAME.

            * c-c++-common/gomp/atomic-24.c: New test.

Reply via email to