aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-04-10 18:16:37 -0400
committerJason Merrill <jason@redhat.com>2025-04-11 09:53:40 -0400
commit4acdfb71d4fdaa43c2707ad7b2fb7b2b7bddfc42 (patch)
treefd375ef200d46d57efa5ab73dba0bc715f7b3332 /gcc/rust/ast
parent44478b69d70ff0095a1fd06392e380827de4688a (diff)
downloadgcc-4acdfb71d4fdaa43c2707ad7b2fb7b2b7bddfc42.zip
gcc-4acdfb71d4fdaa43c2707ad7b2fb7b2b7bddfc42.tar.gz
gcc-4acdfb71d4fdaa43c2707ad7b2fb7b2b7bddfc42.tar.bz2
c++: avoid ARM -Wunused-value [PR114970]
Because of the __builtin_is_constant_evaluated, maybe_constant_init in expand_default_init fails, so the constexpr constructor isn't folded until cp_fold, which then calls cp_build_init_expr_for_ctor, which builds a COMPOUND_EXPR in case the enclosing expression is relying on the ARM behavior of returning 'this'. As in other places, avoid -Wunused-value on artificial COMPOUND_EXPR. PR c++/114970 gcc/cp/ChangeLog: * cp-gimplify.cc (cp_build_init_expr_for_ctor): Suppress warnings on return_this COMPOUND_EXPR. gcc/testsuite/ChangeLog: * g++.dg/opt/is_constant_evaluated4.C: New test.
Diffstat (limited to 'gcc/rust/ast')
0 files changed, 0 insertions, 0 deletions