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

            Bug ID: 106464
           Summary: [OpenMP] atomic compare – gcc wrongly accepts
                    parenthesized expression
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic, openmp
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org,
                    webrown.cpp at gmail dot com
        Depends on: 106448
  Target Milestone: ---

+++ This bug was initially created as a clone of Bug #106448 +++

As mentioned in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106448#c1
gcc incorrectly accepts:
int x;

void
bar (void)
{
  #pragma omp atomic
  x = (x + 6);
  #pragma omp atomic
  x = (x * 6);
}
in C (properly rejects it in C++).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106448
[Bug 106448] [OpenMP] atomic compare – g++ wrongly accepts parenthesized
condition

Reply via email to