[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 23:18:16 +0200

[Sorry; forgot to answer to the list]

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

Microsoft Visual C uses _MSC_VER to declare its use and its version.
__declspec(deprecated) was introduced in VC.Net 2002 (_MSC_VER = 1300)

The _MSC_VER numbering started in the MSDOS versions.

VC++ 1.0 for Windows 3.1 used version 800 if I remember correctly. I do
remember you had to install twenty-one 3.5" disks ;-)

        Bert

Arfrever: I fixed the version number since the first mail. Visual C++ 2003 used 1310 instead of 1300 and 1200 = VC 6.0

---------------------------------------------------------------------
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 23:18:40 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.