[v3] annex D 8 and 9 for C++0x
Mark Mitchell
mark@codesourcery.com
Sun Nov 4 23:22:00 GMT 2007
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
More information about the Libstdc++
mailing list