[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: Bert Huijben <bert_at_vmoo.com>
Date: Mon, 18 Aug 2008 22:15:36 +0200

> -----Original Message-----
> From: Arfrever Frehtes Taifersar Arahesis
> [mailto:arfrever.fta_at_gmail.com]
> Sent: maandag 18 augustus 2008 21:49
> To: Subversion Development
> Subject: [RFC] Mark deprecated functions with SVN_DEPRECATED /
> __attribute__((deprecated))
>
> 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.

Microsoft Visual C++ has a similar method of marking methods: __declspec(deprecated)
Or __declspec(deprecated("Message")) if you would like to add your own message to the warning.

        Bert

---------------------------------------------------------------------
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:15:59 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.