From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1E3173AA9C1D; Sun, 15 Mar 2020 12:03:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E3173AA9C1D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584273780; bh=Nr+FKUsMmE/trQN9NhHN9/07hBGJuBjZPwms8QWC0gE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=roRk3964QYNhCX8jMJoLSVPUQx6f2V2YblZewgXYzRAzwxHrhGqTqUZ0wQjdFyQ40 pqc0/U1y6zW2VBrZTQZiZN+Dlku9/jw6apdD5+5AVIXpuAXKoQ4TGQ2y+ts/LkdPEV RcSjGLtl3Aq+Hso2XWtcZFEfkOyYtxpaHIs/QpOk= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67960] [8/9 Regression] Prefixing a function with [[deprecated]] produces multiple warnings Date: Sun, 15 Mar 2020 12:02:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Mar 2020 12:03:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67960 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marxin at gcc dot gnu.org --- Comment #9 from Martin Li=C5=A1ka --- commit r10-7159-g80a13af724aedfb360893dcc16aa7cc12ca49799 Author: Patrick Palka Date: Thu Mar 12 14:38:42 2020 -0400 c++: Redundant -Wdeprecated-declarations warning in build_over_call [PR67960] In build_over_call, we are emitting a redundant -Wdeprecated-declaratio= ns warning about the deprecated callee function, first from mark_used and again from build_addr_func <- decay_conversion <- cp_build_addr_expr <- mark_used. It seems this second deprecation warning coming from build_addr_func wi= ll always be redundant, so we can safely use a warning_sentinel to disable it bef= ore calling build_addr_func. (And any deprecation warning that could come = from build_addr_func would be for FN, so we wouldn't be suppressing too much= .) gcc/cp/ChangeLog: PR c++/67960 * call.c (build_over_call): Use a warning_sentinel to disable warn_deprecated_decl before calling build_addr_func. gcc/testsuite/ChangeLog: PR c++/67960 * g++.dg/diagnostic/pr67960.C: New test. * g++.dg/diagnostic/pr67960-2.C: New test.=