Article View: comp.sys.atari.st
Article #3040A bug in Sozobon Optimizer ? (Original title: Re: (none))
From: Leo de Wit
Date: Thu, 10 Aug 1989 06:28
Date: Thu, 10 Aug 1989 06:28
28 lines
1307 bytes
1307 bytes
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 <osbind.h>
|
|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.
Technical Details
Message-ID:
<1065@philmds.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!phigate!philmds!leoReferences:
<8908092123.AA03210@ucbvax.Berkeley.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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