[Bug middle-end/104436] [12 Regression] spurious -Wdangling-pointer assigning local address to a class passed by value
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 15 00:27:17 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104436
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:373a2dc2be0089ae59b61202a6023458aaaf63d8
commit r12-7650-g373a2dc2be0089ae59b61202a6023458aaaf63d8
Author: Martin Sebor <msebor@redhat.com>
Date: Mon Mar 14 18:23:08 2022 -0600
Avoid -Wdangling-pointer for by-transparent-reference arguments [PR104436].
This change avoids -Wdangling-pointer for by-value arguments transformed
into by-transparent-reference.
Resolves:
PR middle-end/104436 - spurious -Wdangling-pointer assigning local address
to a class passed by value
gcc/ChangeLog:
PR middle-end/104436
* gimple-ssa-warn-access.cc (pass_waccess::check_dangling_stores):
Check for warning suppression. Avoid by-value arguments
transformed
into by-transparent-reference.
gcc/testsuite/ChangeLog:
PR middle-end/104436
* c-c++-common/Wdangling-pointer-8.c: New test.
* g++.dg/warn/Wdangling-pointer-5.C: New test.
More information about the Gcc-bugs
mailing list