https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101297
Bug ID: 101297
Summary: Spurious comma accepted at the end of #pragma omp
atomic
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
int i;
void
foo (void)
{
#pragma omp atomic update, /* { dg-error "expected end of line before ','
token" } */
i++;
#pragma omp atomic update,, /* { dg-error "expected end of line before ','
token" } */
i++;
}
diagnoses with -fopenmp only the second error and not the first one (seems both
clang and ICC suffer from the same bug though).