[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [RFC] Mark deprecated functions with SVN_DEPRECATED / __attribute__((deprecated))

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 18 Aug 2008 23:17:03 +0300 (Jerusalem Daylight Time)

Arfrever Frehtes Taifersar Arahesis wrote on Mon, 18 Aug 2008 at 21:48 +0200:
> I would like to suggest that deprecated functions be additionally marked with
> __attribute__((deprecated)) [1]. I suggest to directly use SVN_DEPRECATED
> which can be defined in a header (e.g. svn_types.h) by:
> #define SVN_DEPRECATED __attribute__((deprecated))
> Using __attribute__((deprecated)) causes that compiler prints a warning during
> compilation when a deprecated function is called:
> FILE:FILE_LINE: warning: °FUNCTIONĘ is deprecated (declared at HEADER:HEADER_LINE)
> apr.h defines __attribute__(__x) as empty definition on systems which don't
> support function attributes.
> [1] http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Attributes.html

For anyone who hasn't followed the To Greg Stein thread, where he
suggested to move deprecated functions' declarations to an
svn_deprecated.h header:

Martin and I pointed there that doing so would allow catching all calls to
deprecated functions at compile-time by using #define's to avoid including
the svn_deprecated.h header.

(Just listing here for completeness.)


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-18 22:17:19 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.