Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!van-bc!rsoft!mindlink!a563 From: a563@mindlink.UUCP (Dave Kirsch) Newsgroups: comp.os.msdos.programmer Subject: Re: TC++ bug Message-ID: <2557@mindlink.UUCP> Date: 20 Jul 90 23:47:49 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 31 > aviv@discus.technion.ac.il writes: > The only conclusion for us was : DON'T USE JUMP OPTIMIZATION ! > (or may be any other optimization ??) > It can INSERT BUGS into your code. > > Until now, we did not find other bugs. > > And you ??? If you look in the manual (and this appears on both TC and MSC manuals), there are warnings that optimizations will cause some code to break. Specificly, in the TC 2.0 manual, there is a whole section on warning about use register optimization (not register variables). This problem would seem to be related to register optimization, not jump optimization. Does -O indicate to TC++ that it should do register optimization as well? Any optimizations will cause code to "break". I assume somehow you didn't have register optimization on in TC 2.0 (you probably just had jump optimization). I suppose that if you took this same code to TC 2.0 and turned ON register optimization (O/C/O/R in the IDE or -Z on the command line) this code would probably not function; as you have indicated. It's not a bug, it's due to optimization, which any compiler warns you about when you read about enabling optimizations. -- -- David Kirsch UUCP: {uunet,ubc-cs}!van-bc!rsoft!mindlink!a563 Voice: (604) 327-4404 a563@mindlink.UUCP Vancouver, British Columbia 'In-no-sense? Nonsense!' - The Art Of Noise