Path: utzoo!attcan!uunet!mcvax!hp4nl!phigate!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: A bug in Sozobon Optimizer ? (Original title: Re: (none)) Summary: No, a bug in your program. Message-ID: <1065@philmds.UUCP> Date: 10 Aug 89 06:28:26 GMT References: <8908092123.AA03210@ucbvax.Berkeley.EDU> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 28 In article <8908092123.AA03210@ucbvax.Berkeley.EDU> ZUCCONI@FRMOP11.BITNET writes: [] | The following program gives me 2 differents results when compiled |with sozobon C. Without optimization , I get the correct result: | 01-09-89 06:25 |and compiled with the -O flag, I get | 01-09-89- 06:2 | Has someone found and fix such "features" in the optimizer? | | |----------------------------- Cut Here --------------------------------- |#include| |main() |{ | char txt[10]; | | convtime(0x1321,0x3333,txt); | | printf("%s\n",txt); |} The problem is not with the optimizer, but with your program. According to the output produced, txt[] should accomodate for at least 15 characters. Since it doesn't, the fact that it works correctly in the unoptimized case is just sheer luck. Leo.