This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Extend __attribute__((deprecated)) with an optional message


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]