Open ghost opened 9 years ago
Hi, Thanks for the report. What are the types for n, task[t].info.needed, untaken_out, QMask? Could you provide a piece of code, so I could try to reproduce it myself?
Best regards,
Software Engineer Intel Compiler Team Intel Corp.
10.10.2014 9:06, justsomeone1001 пишет:
Here's the output --
helpers.c:986:23: error: statement form is not allowed for '#pragma omp atomic read' ATOMIC_READ_CHAR (n = task[t].info.needed); ^ helpers.c:140:3: note: expanded from macro 'ATOMIC_READ_CHAR' /stmt/; \ ^ helpers.c:1024:22: error: statement form is not allowed for '#pragma omp atomic write' ATOMIC_WRITE_CHAR (untaken_out = (untaken_out + 1) & QMask); ^ helpers.c:148:3: note: expanded from macro 'ATOMIC_WRITE_CHAR' /stmt/; \ ^ helpers.c:2092:24: error: statement form is not allowed for '#pragma omp atomic write' ATOMIC_WRITE_CHAR (untaken_in = (untaken_in+1) & QMask); ^ helpers.c:148:3: note: expanded from macro 'ATOMIC_WRITE_CHAR' /stmt/; \ ^ helpers.c:2099:24: error: statement form is not allowed for '#pragma omp atomic write' ATOMIC_WRITE_CHAR (untaken_in = (untaken_in+1) & QMask);
And here's an example of the macros:
define ATOMIC_READ_CHAR(/stmt/) do { \
/Pragma("omp atomic read") \ _stmt/; \ } while (0)
endif
— Reply to this email directly or view it on GitHub https://github.com/clang-omp/clang/issues/45.
Sure - if you give me your e-mail I'll just send you the source file. It's not long.
Well it is long, but the part that doesn't work is at the top.
Here's the output --
helpers.c:986:23: error: statement form is not allowed for '#pragma omp atomic read' ATOMIC_READ_CHAR (n = task[t].info.needed); ^ helpers.c:140:3: note: expanded from macro 'ATOMIC_READ_CHAR' stmt; \ ^ helpers.c:1024:22: error: statement form is not allowed for '#pragma omp atomic write' ATOMIC_WRITE_CHAR (untaken_out = (untaken_out + 1) & QMask); ^ helpers.c:148:3: note: expanded from macro 'ATOMIC_WRITE_CHAR' stmt; \ ^ helpers.c:2092:24: error: statement form is not allowed for '#pragma omp atomic write' ATOMIC_WRITE_CHAR (untaken_in = (untaken_in+1) & QMask); ^ helpers.c:148:3: note: expanded from macro 'ATOMIC_WRITE_CHAR' stmt; \ ^ helpers.c:2099:24: error: statement form is not allowed for '#pragma omp atomic write' ATOMIC_WRITE_CHAR (untaken_in = (untaken_in+1) & QMask);
And here's an example of the macros:
define ATOMIC_READ_CHAR(stmt) do { \
_Pragma("omp atomic read") \ stmt; \ } while (0)
endif