This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Extend __attribute__((deprecated)) with an optional message
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "Andrew C. Morrow" <acm at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Nov 2008 14:44:03 -0800
- Subject: Re: [PATCH] Extend __attribute__((deprecated)) with an optional message
- References: <f5f307210811141440u3df36e65xe9b84139031620fe@mail.gmail.com>
On Fri, Nov 14, 2008 at 2:40 PM, Andrew C. Morrow <acm@google.com> wrote:
> Hi -
>
> The following patch extends __attribute__((deprecated)) with an
> optional string to be emitted in the deprecation warning:
>
> int foo __attribute__((deprecated("use new_foo")));
> int bar = foo;
>
> Will emit a warning like: warning: 'foo' is deprecated (declared at
> ...) with message 'use new_foo'
This is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36892 .
There was a patch submitted 2 months ago also:
http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01095.html.
I don't know what the difference is between yours and his but yours at
least includes documentation.
Thanks,
Andrew Pinski