PATCH RFA: Permit backward/hash_map with -Wdeprecated

Manuel López-Ibáñez lopezibanez@gmail.com
Sat Apr 10 12:52:00 GMT 2010


On 10 April 2010 12:55, Paolo Carlini <pcarlini@gmail.com> wrote:
> Hi,
>
>> Bootstrapped and ran libstdc++ testsuite on i686-pc-linux-gnu.  OK for
>> mainline?
>
> I'm away from my primary development machine and cannot check the whole
> logic behind those macros, but first blush I'm not ok with the patch. *When*
> are we going to warn, with the patch applied? Because morally this stuff
> *is* deprecated, and that is already a concession. If essentially we are
> going to never warn, then let's move back this stuff to ext/, seems much
> cleaner to me. I have no problem with the other maintainers overruling me
> about these issues, but really personally I'm not confortable with extending
> the life of this old code, simply we don't have the manpower to care about
> legacy stuff, with all the work ahead of us for C++1x!

I would suggest that if one wants to get warnings for deprecated
features but not for one particular deprecated feature, then one
should use the pragma GCC diagnostics to enable/disable warnings. Yes,
I know this doesn't work at the moment. We will be better off fixing
it that trying to find workarounds to implement its effects. Also, it
would be better to have something like:

__GCC_DEPRECATED_FEATURE("message")

or

#pragma GCC deprecated-feature message

that expands to #warning / #error / nothing appropriately. The current
approach is too simplistic.

For example, "-Werror -Wno-error=deprecated" and "-Werror=deprecated"
do not work as expected. Also -fdiagnostics-show-option does not show
[-Wdeprecated].

I am going to open a bug about this.

Cheers,

Manuel.



More information about the Libstdc++ mailing list