This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Problem with binary operation and result code
- From: "Groschopf, Leonhard" <Leonhard dot Groschopf at fh-vie dot ac dot at>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 04 May 2004 15:34:30 +0200
- Subject: 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