BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

#pragma obsolete not fully work

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
Tales Aguiar
Guest





PostPosted: Wed Jun 22, 2005 8:33 pm    Post subject: #pragma obsolete not fully work Reply with quote



In this sample, the 'ObsoleteFuncion', marked with #pragma obsolete, show
warning only if the method is called inside amother method of same class.
Bug? Or I made something wrong?

class Teste
{
public:
void ObsoleteFunction();
#pragma obsolete ObsoleteFunction
void CallObsolete();
};

void AmotherFunction()
{
Teste A;
A.ObsoleteFunction(); // do not show warning
}

void Teste::CallObsolete()
{
ObsoleteFunction(); // warning
}


Back to top
Ed Mulroy
Guest





PostPosted: Wed Jun 22, 2005 9:44 pm    Post subject: Re: #pragma obsolete not fully work Reply with quote



A pragma is not a member item.

Your pragma declared a global function, essentially ::ObsoleteFunction, to
be obsolete but your complaint is that it did not declare a class member
function to be obsolete.

.. Ed

Quote:
Tales Aguiar wrote in message
news:42b9cb39 (AT) newsgroups (DOT) borland.com...
In this sample, the 'ObsoleteFuncion', marked with #pragma obsolete, show
warning only if the method is called inside amother method of same class.
Bug? Or I made something wrong?

class Teste
{
public:
void ObsoleteFunction();
#pragma obsolete ObsoleteFunction
void CallObsolete();
};

void AmotherFunction()
{
Teste A;
A.ObsoleteFunction(); // do not show warning
}

void Teste::CallObsolete()
{
ObsoleteFunction(); // warning
}



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.