This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: Permit backward/hash_map with -Wdeprecated
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Paolo Carlini <pcarlini at gmail dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 Apr 2010 14:52:09 +0200
- Subject: Re: PATCH RFA: Permit backward/hash_map with -Wdeprecated
- References: <mcrzl1c2l0m.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <57D36E1A-3CC7-458C-88EF-55E197CE9DD5@oracle.com>
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.