This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] annex D 8 and 9 for C++0x
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, Gabriel Dos Reis <gdr at cs dot tamu dot edu>, libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 04 Nov 2007 15:22:07 -0800
- Subject: Re: [v3] annex D 8 and 9 for C++0x
- References: <9f71cef00710260925s2a1c8662n570849103f709695@mail.gmail.com> <871wbh910k.fsf@soliton.cs.tamu.edu> <4348dea50710261202l43867011j4d6bba1ba76d4ef@mail.gmail.com> <20071026143035.5e29c75f@concorde.artheist.org>
Benjamin Kosnik wrote:
> Ah. Well, in this case, you could use -Wno-deprecated-declarations to
> get rid of just the auto_ptr and binder deprecation warnings.
>
>> I'm concerned that there's no easy transition.
I don't quite understand the plan here. Will just -std=c++0x be enough
to generate the warning, or will I have to say something like -std=c++0x
-DWARN_ABOUT_CXX0X_DEPRECATIONS to see the warning? I would prefer the
latter for reasons explained below.
> I believe you can, as above. Summarized as:
>
> -Wno-deprecated, no deprecated warnings of any kind
>
> -Wno-deprecated-declarations, no warnings for __attribute__ deprecated.
My concern here is that __attribute__((deprecated)) is not just a system
library attribute. Users can and do use this attribute in their own
code. -Wno-deprecated-declarations may not be acceptable to them
because it turns off their own warnings (or warnings from third-party
libraries) as well. I think the idiom ought to be something like:
#ifdef __GLIBCXX_WARN_CXX0X_DEPRECATIONS
__attribute__((deprecated))
#endif
class auto_ptr
Again, I'm not sure quite what plan is being suggested so it may well be
that this idea has already been anticipated.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713