public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/59325] New: Provide a way to disable deprecated warnings
@ 2013-11-28  8:40 andysem at mail dot ru
  2013-11-28 11:14 ` [Bug libstdc++/59325] " redi at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: andysem at mail dot ru @ 2013-11-28  8:40 UTC (permalink / raw)
  To: gcc-bugs

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++.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-20 16:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28  8:40 [Bug libstdc++/59325] New: Provide a way to disable deprecated warnings andysem at mail dot ru
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

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).