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++/90451] [9/10/11/12 Regression] "static" function which added "deprecated" print deprecated warning >1 times (twice or even 3 times) Date: Thu, 17 Feb 2022 21:22:38 +0000 [thread overview] Message-ID: <bug-90451-4-ASphXtFZYn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-90451-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90451 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:c352ef0ed90cfc07d494dfec111121bc683e337b commit r12-7285-gc352ef0ed90cfc07d494dfec111121bc683e337b Author: Jason Merrill <jason@redhat.com> Date: Wed Feb 16 14:05:39 2022 -0500 c++: avoid duplicate deprecated warning [PR90451] We were getting the deprecated warning twice for the same call because we called mark_used first in finish_qualified_id_expr and then again in build_over_call. Let's not call it the first time; C++17 clarified that a function is used only when it is selected from an overload set, which happens later. Then I had to add a few more uses in places that don't do anything further with the expression (convert_to_void, finish_decltype_type), and places that use the expression more unusually (cp_build_addr_expr_1, convert_nontype_argument). The new mark_single_function is mostly so that I only have to put the comment in one place. PR c++/90451 gcc/cp/ChangeLog: * decl2.cc (mark_single_function): New. * cp-tree.h: Declare it. * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF. * semantics.cc (finish_qualified_id_expr): Not here. (finish_id_expression_1): Or here. (finish_decltype_type): Call mark_single_function. * cvt.cc (convert_to_void): And here. * pt.cc (convert_nontype_argument): And here. * init.cc (build_offset_ref): Adjust assert. gcc/testsuite/ChangeLog: * g++.dg/warn/deprecated-14.C: New test. * g++.dg/warn/deprecated-15.C: New test.
next prev parent reply other threads:[~2022-02-17 21:22 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-90451-4@http.gcc.gnu.org/bugzilla/> 2021-04-08 18:02 ` [Bug c++/90451] [8/9/10/11 " jason at gcc dot gnu.org 2021-04-09 13:53 ` jason at gcc dot gnu.org 2021-05-14 9:51 ` [Bug c++/90451] [9/10/11/12 " jakub at gcc dot gnu.org 2021-06-01 8:14 ` rguenth at gcc dot gnu.org 2022-02-17 21:22 ` cvs-commit at gcc dot gnu.org [this message] 2022-02-17 22:55 ` jason at gcc dot gnu.org 2022-09-12 19:47 ` cvs-commit at gcc dot gnu.org 2022-09-12 20:30 ` cvs-commit 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-90451-4-ASphXtFZYn@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).