[Bug c++/105885] [12/13 Regression] the address of 'template argument' will never be NULL warning

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 23 15:07:22 GMT 2022


--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:


commit r13-1218-g6e4d5300c1f62c3f0cd1bf859b0ee6bb4e31e434
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Jun 22 23:50:23 2022 -0400

    c++: -Waddress and value-dependent expr [PR105885]

    We already suppress various warnings for code that would be tautological if
    written directly, but not when it's the result of template substitution. 
    seems we need to do this for -Waddress as well.

            PR c++/105885


            * pt.cc (tsubst_copy_and_build): Also suppress -Waddress for
            comparison of dependent operands.


            * g++.dg/cpp1z/constexpr-if37.C: New test.

More information about the Gcc-bugs mailing list