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

            Bug ID: 89796
           Summary: Incorrect warning generated with OpenMP atomic capture
           Product: gcc
           Version: 8.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: perard at cg dot uni-saarland.de
  Target Milestone: ---

Created attachment 46012
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46012&action=edit
Sample code that reproduces the issue

Hello,

I get the warning "warning: value computed is not used [-Wunused-value]" when
compiling the attached code snippet with:

    g++ test.cpp -fopenmp -Wall -o test

This warning is incorrect, as the value referred to by the warning is in fact
used. Moreover, the warning does not show up when OpenMP is disabled (by
omitting -fopenmp from the command line).

Reply via email to