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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:220fe41fd4085e91a49e62dd815628ec4883a4ea

commit r14-5976-g220fe41fd4085e91a49e62dd815628ec4883a4ea
Author: Patrick Palka <ppa...@redhat.com>
Date:   Wed Nov 29 16:42:39 2023 -0500

    c++: bogus -Wparentheses warning [PR112765]

    We need to consistently look through implicit INDIRECT_REF when
    setting/checking for -Wparentheses warning suppression.  In passing
    use the recently introduced STRIP_REFERENCE_REF helper some more.

            PR c++/112765

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_expr) <case MODOP_EXPR>: Look through implicit
            INDIRECT_REF when propagating -Wparentheses warning suppression.
            * semantics.cc (maybe_warn_unparenthesized_assignment): Replace
            REFERENCE_REF_P handling with STRIP_REFERENCE_REF.
            (finish_parenthesized_expr): Likewise.

    gcc/testsuite/ChangeLog:

            * g++.dg/warn/Wparentheses-33.C: New test.

Reply via email to