[Bug c++/89796] Incorrect warning generated with OpenMP atomic capture
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 25 16:10:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89796
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2019-03-25
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 46018
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46018&action=edit
gcc9-pr89796.patch
Untested fix.
You could have used simpler
#pragma omp atomic capture
prev = c++;
that wouldn't warn (so, if you want a workaround, use that).
More information about the Gcc-bugs
mailing list