]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/86485 - -Wmaybe-unused with empty class ?:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 May 2019 22:37:19 +0000 (22:37 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 May 2019 22:37:19 +0000 (22:37 +0000)
commitc3d2add3ca77e98ffc8b31029cc8a47e57b69d9a
tree82869efd8838e8b1221be15780bb40bded03e106
parenta4057c522874c4eef0ceaacd5eff0beeb07f4253
PR c++/86485 - -Wmaybe-unused with empty class ?:

* typeck.c (build_static_cast_1): Use cp_build_addr_expr.

For GCC 9 I fixed this bug with a patch to gimplify_cond_expr, but this
function was also doing the wrong thing.

Using build_address does not push the ADDR_EXPR down into the arms of a
COND_EXPR, which we need for proper handling of conversion of an lvalue ?:
to another reference type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270985 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/typeck.c