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

            Bug ID: 114970
           Summary: 32-bit ARM gcc-14.1 new false positive -Wunused-value
           Product: gcc
           Version: 14.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nilsgladitz at gmail dot com
  Target Milestone: ---

Created attachment 58114
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58114&action=edit
Testcase

The attached reduced test case produces the following warning:
test.cpp:6:43: warning: value computed is not used [-Wunused-value]
    6 |         std::string_view prefix("<prefix>");

When compiling with:
 -Wall -std=c++20 -O2

I see the warning when building for 32-bit ARM but not x86-64.
There is no warning with GCC 13.2.0.

Also seen with godbolt on "trunk": https://godbolt.org/z/GvbMMsfch
  • [Bug c++/114970] New: 32-bit ARM... nilsgladitz at gmail dot com via Gcc-bugs

Reply via email to