From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 191863858C3A; Tue, 31 Oct 2023 17:29:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 191863858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698773371; bh=UwcnIMgItA2Jf7smO6SM5SaB5b46fpjvQmQyVBXWx8c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=P4bEoIk6x4HEvLBfwPQhis5kfx/2v9+MB0jNBzF+K5BJPXL/wt6nEhJSf0KPZN1SS GYRJp8EK/VEO3rmIscyrh5OCor53+SxX33vmStSUNQkXdb10FWUMEHkkfT/MAPEXJ/ 4Fz2b0gjHTD8b+HTEdJN/E4EkGLdsU3R/6JlgubA= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112318] Deprecated move ctor does not trigger -Wdeprecated-declarations when creating a std::optional Date: Tue, 31 Oct 2023 17:29:30 +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: 13.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112318 --- Comment #3 from Jonathan Wakely --- As this bug points out, we probably want to warn for any uses of deprecated entities declared in user code, whether used in system headers or in user c= ode. And for something like std::auto_ptr which is declared in a system header, = we want to warn if it's used in user code. So I think we should only suppress the warning when the declaration *and* t= he use are both in system headers.=