This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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]

Re: Strange behavior


I don't think it's cygwin.

Looks like something in gnu (complier or libs?).

David

---


72$ uname -a && g++ --version && ./rtest2
Linux milo 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
2.96
5/4
1
-1/4
1
3/8
1
2/3
0

319$ uname -a && g++ --version ; ./rtest2
SunOS opus 5.7 Generic sun4u sparc SUNW,Ultra-1
2.95.3
5/4
1
-1/4
1
3/8
1
2/3
1

On Sat, 2002-03-02 at 16:18, Chuck Allison wrote:
> I have a simple Rational number class and have discovered  weird behavior
> with Cygwin's g++. If you look at the very short main program in file
> rtest2.cpp, you will see by the output that g++ get's the wrong answer for
> 
> r1 / r2 == Rational(2,3); // should be true
> 
> even though it prints as 2/3! Borland and Microsoft get it right. Any ideas?
> All code atached.
> 
> Thanks.
> 
> -- Chuck Allison (The Harmonious CodeSmith)
> -- Senior Editor, C/C++ Users Journal
> -- cda@freshsources.com
> 
> ----
> 
{ snip }

-- 

No trees were killed in the sending of this message. However,
a large number of electrons were terribly inconvenienced.

Attachment: signature.asc
Description: This is a digitally signed message part


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