public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109774] template function causes Spurious dangling reference warning while non-template does not Date: Tue, 16 May 2023 19:54:05 +0000 [thread overview] Message-ID: <bug-109774-4-A8OVlqF7tC@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109774-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109774 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>: https://gcc.gnu.org/g:22741a09a8cbf8a360e99e530b016233dd705ce4 commit r13-7337-g22741a09a8cbf8a360e99e530b016233dd705ce4 Author: Marek Polacek <polacek@redhat.com> Date: Tue May 16 14:12:06 2023 -0400 c++: -Wdangling-reference not suppressed in template [PR109774] In check_return_expr, we suppress the -Wdangling-reference warning when we're sure it would be a false positive. It wasn't working in a template, though, because the suppress_warning call was never reached. PR c++/109774 gcc/cp/ChangeLog: * typeck.cc (check_return_expr): In a template, return only after suppressing -Wdangling-reference. gcc/testsuite/ChangeLog: * g++.dg/warn/Wdangling-reference13.C: New test. (cherry picked from commit f25d2de17663a0132f9fe090dee39d3b1132067b)
next prev parent reply other threads:[~2023-05-16 19:54 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-08 15:19 [Bug c++/109774] New: Spurious dangling reference warning in GCC 13 - another variant minty.bobby at gmail dot com 2023-05-09 13:21 ` [Bug c++/109774] template function causes Spurious dangling reference warning while non-template does not ppalka at gcc dot gnu.org 2023-05-10 20:57 ` mpolacek at gcc dot gnu.org 2023-05-16 19:40 ` cvs-commit at gcc dot gnu.org 2023-05-16 19:54 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-16 19:54 ` mpolacek at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109774-4-A8OVlqF7tC@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).