This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with binary operation and result code


Hallo,

I am trying to compile code like this:

Class object;

If (SUCCESSFUL != object.get_a_value(value) ){
	//error ....
}

 
But g++ doesn?t like this. g++ wants an get_a_value method without a 
return value. 

This code is compliable with a sun complier and I am wondering if some of 
you had a similar problem. There are really a huge amount of these 
statements, so re-writing is not a good idea.  Is there a compiler 
options to make g++ understand such a statement?

This works:

Class object;
ResultCodes res;

res = object.get_a_value(value);

If (SUCCESSFUL != res){
	//error
}

I am using:
g++ 3.0.4. 
RH 7.2 /  2.4.7-10

Thank you very much for your help!!

Leonhard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]