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++/93805] [8/9/10 Regression] A suspicious -Werror=noexcept warning since r8-2461-g9fb82e652cee118b Date: Mon, 23 Mar 2020 20:12:30 +0000 [thread overview] Message-ID: <bug-93805-4-w4DPtU7TMe@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-93805-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93805 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:1f6c1c82eb5001a844b5ac535f6aba4a3257031f commit r10-7345-g1f6c1c82eb5001a844b5ac535f6aba4a3257031f Author: Patrick Palka <ppalka@redhat.com> Date: Fri Mar 13 14:30:39 2020 -0400 c++: Avoid a suspicious -Wnoexcept warning [PR93805] In this PR we're emitting -Wnoexcept warnings about potentially-throwing NSDMIs when computing the noexcept specification of a class's defaulted default constructor. Although these warnings are in some sense valid, this patch takes the route of suppressing them, because: 1. the warning message is confusing in its current form; 2. warning for 'struct C { B b = B(); };' but not for 'struct C { B b; };' is inconsistent; and 3. emitting a warning here arguably doesn't fall under the umbrella of -Wnoexcept, whose documentation says it warns only when a noexcept-expression evaluates to false, but there are no noexcept-expressions here. gcc/cp/ChangeLog: PR c++/93805 * except.c (maybe_noexcept_warning): Add TODO comment. * method.c (walk_field_subobs): Pass tf_none to expr_noexcept_p. gcc/testsuite/ChangeLog: PR c++/93805 * g++.dg/warn/Wnoexcept2.C: New test.
next prev parent reply other threads:[~2020-03-23 20:12 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-93805-4@http.gcc.gnu.org/bugzilla/> 2020-03-11 19:20 ` ppalka at gcc dot gnu.org 2020-03-12 14:05 ` ppalka at gcc dot gnu.org 2020-03-23 20:12 ` cvs-commit at gcc dot gnu.org [this message] 2020-03-23 20:16 ` [Bug c++/93805] [8/9 " ppalka at gcc dot gnu.org 2021-05-14 9:52 ` [Bug c++/93805] [9 " jakub at gcc dot gnu.org 2021-06-01 8:16 ` rguenth at gcc dot gnu.org 2022-05-27 8:44 ` rguenth 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-93805-4-w4DPtU7TMe@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).