https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104702
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:cc76c502a761ddaee215bcbd8fe4720e46d3b9dd

commit r12-8024-gcc76c502a761ddaee215bcbd8fe4720e46d3b9dd
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed Apr 6 10:59:40 2022 -0400

    c++: -Wunused-value and array init [PR104702]

    Here, because of problems with the new warning-control code and expressions
    that change location, the suppress_warning on the INDIRECT_REF didn't work.
    Those problems still need to be worked out, but it's simple to avoid
needing
    to use suppress_warning in the first place by using a reference instead.

            PR c++/104702

    gcc/cp/ChangeLog:

            * init.cc (build_vec_init): Use a reference for the result.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wunused-19.C: New test.

Reply via email to