[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: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Mon, 18 Aug 2008 22:50:40 +0200

2008-08-18 22:15:36 Bert Huijben napisał(a):
> > -----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.

Does Microsoft Visual C define a definition which allows to unequivocally
identify this compiler?
(GCC defines __GNUC__.)

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-08-18 22:53:23 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.