From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7F2039450D0; Tue, 20 Oct 2020 14:32:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7F2039450D0 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/59325] Provide a way to disable deprecated warnings Date: Tue, 20 Oct 2020 14:32:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: WAITING 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 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: Tue, 20 Oct 2020 14:32:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59325 --- Comment #7 from Jonathan Wakely --- (In reply to andysem from comment #4) > I just think that all these hoops could be avoided if libstdc++ was a lit= tle > more friendly in this regard. After all, there's no harm in using e.g. > auto_ptr in C++11 code, it surely won't disappear from STL any time soon,= so > the warning is a bit overreactive anyway. Well it is gone from the recent standards, and is not longer defined by oth= er std::lib implementations when compiling with newer standards, e.g. libc++ doesn't define it in C++17 mode. That's exactly what the warning is telling you: you're using a feature which is going away. If you want to ignore the warning because you know you're not going to use a different implementation or a newer standard, you can use -Wno-deprecated to disable all such warnings globally or use #pragma to disable them locally.=