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

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

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Mon, 18 Aug 2008 21:48:55 +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

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-08-18 21:52:28 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.