public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with binary operation and result code
@ 2004-05-04 13:36 Groschopf, Leonhard
  2004-05-04 13:42 ` Eljay Love-Jensen
  2004-05-04 13:47 ` llewelly
  0 siblings, 2 replies; 3+ messages in thread
From: Groschopf, Leonhard @ 2004-05-04 13:36 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with binary operation and result code
  2004-05-04 13:36 Problem with binary operation and result code Groschopf, Leonhard
@ 2004-05-04 13:42 ` Eljay Love-Jensen
  2004-05-04 13:47 ` llewelly
  1 sibling, 0 replies; 3+ messages in thread
From: Eljay Love-Jensen @ 2004-05-04 13:42 UTC (permalink / raw)
  To: Groschopf, Leonhard, gcc-help

Hi Leonhard,

Works on my system.

Please give a complete compilable program example that replicates the error.

Thanks,
--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with binary operation and result code
  2004-05-04 13:36 Problem with binary operation and result code Groschopf, Leonhard
  2004-05-04 13:42 ` Eljay Love-Jensen
@ 2004-05-04 13:47 ` llewelly
  1 sibling, 0 replies; 3+ messages in thread
From: llewelly @ 2004-05-04 13:47 UTC (permalink / raw)
  To: Groschopf, Leonhard; +Cc: gcc-help

"Groschopf, Leonhard" <Leonhard.Groschopf@fh-vie.ac.at> writes:

> Hallo,
> 
> I am trying to compile code like this:
> 
> Class object;
> 
> If (SUCCESSFUL != object.get_a_value(value) ){
> 	//error ....
> }
[snip]

Please post an example which is short but sufficient to reproduce the
    problem.

DONT try 'approximate' the code; you did that here, and you wrote
    'Class', which isn't C++ at all.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-04 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-04 13:36 Problem with binary operation and result code Groschopf, Leonhard
2004-05-04 13:42 ` Eljay Love-Jensen
2004-05-04 13:47 ` llewelly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).