delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/28/12:30:27

Newsgroups: comp.os.msdos.djgpp
From: Kev <co273 AT freenet DOT buffalo DOT edu>
Subject: RE: Program goes wrong when optimized under gcc 2.8
In-Reply-To: <D1DE20405ECBD011B2AC0060974BC6EA04F925@DBSERVER>
Message-ID: <F003BI.Hz6@freenet.buffalo.edu>
Sender: nntp AT acsu DOT buffalo DOT edu
NNTP-Posting-Host: freenet.buffalo.edu
Organization: Buffalo Free-Net
References: <D1DE20405ECBD011B2AC0060974BC6EA04F925 AT DBSERVER>
Mime-Version: 1.0
Date: Mon, 28 Sep 1998 15:35:27 GMT
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> > > > When I compile the program like this: gcc -o hot2std.exe hot2std.c
> > > > it works perfeclty.
> > > > If I try to compile with optimization (gcc -O[1,2 or 3] -o
> > hot2std.exe
> > > > hot2std.c), I get strange outputs, compared to those of the debug
> > > > version.
> > 
Hmmm...I ran across the same bug when compiling in a DOS prompt or a batch
file...
For some reason, DFE95 Version 3.12 has no problems with parsing the
optimization command to GCC...Perhaps a problem with GCC's ability to
parse between O and o and thought that you wanted 2 exectutables built
from the same source in DOS's command line?
Well, Anyways...I usually don't use the -O options...I seem to get better
results using:
-m486 (Code optimized for 486)
-fomit-framepointer (saves an extra register)
-malign-doubles (seems to be faster for Pentiums)

Oh well, My opinion...
Haven't tried to build a makefile with the -O options yet...

					:)kev

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019