public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "andysem at mail dot ru" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/59325] New: Provide a way to disable deprecated warnings Date: Thu, 28 Nov 2013 08:40:00 -0000 [thread overview] Message-ID: <bug-59325-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59325 Bug ID: 59325 Summary: Provide a way to disable deprecated warnings Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: andysem at mail dot ru In C++11 mode, libstdc++ marks some standard components from C++03 as deprecated and emits warnings whenever these components are used. In particular std::auto_ptr, std::bind1st and std::bind2nd are marked that way. While the standard lists these components as deprecated, they are still used in many libraries for portability reasons, so that the code compiles both in C++03 and C++11 modes. The problem is that the warnings are flagged not only for the libraries but also for the client's code that uses them, and for the client these warnings are useless and even harmful because they clutter the compiler output. The suggested solution to disable the warnings by adding compiler switches is too strong because not only libstdc++ warnings are disabled this way but also other deprecated warnings too. So, to sum up, my use case is as follows. Application A uses library B. A and B are in C++11, but B uses C++03 legacy components for portability. B has its own API and some parts of it get deprecated as new versions come out. The developer of A is interested in seeing warnings about those API deprecation, but not about B using legacy C++ internally. My proposal is to add a configuration macro that, when defined by the user, will disable deprecation warnings from libstdc++. This would solve the problem in my example - the developer of A would define this macro and only see the warnings from B and not libstdc++.
next reply other threads:[~2013-11-28 8:40 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-28 8:40 andysem at mail dot ru [this message] 2013-11-28 11:14 ` [Bug libstdc++/59325] " redi at gcc dot gnu.org 2013-11-28 11:43 ` andysem at mail dot ru 2013-11-28 12:23 ` redi at gcc dot gnu.org 2013-11-28 13:03 ` andysem at mail dot ru 2014-12-21 11:10 ` redi at gcc dot gnu.org 2020-10-20 14:28 ` redi at gcc dot gnu.org 2020-10-20 14:32 ` redi at gcc dot gnu.org 2020-10-20 14:46 ` andysem at mail dot ru 2020-10-20 16:07 ` redi 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-59325-4@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).