delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/05/17/08:34:03

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: rugxulo AT gmail DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: -fomit-frame-pointer not enabled when using -O ???
Date: 17 May 2006 05:18:29 -0700
Organization: http://groups.google.com
Lines: 22
Message-ID: <1147868309.242796.241420@j73g2000cwa.googlegroups.com>
References: <1147811247 DOT 971831 DOT 35000 AT i40g2000cwc DOT googlegroups DOT com>
<200605162137 DOT k4GLb6CG006212 AT envy DOT delorie DOT com>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1147868314 18957 127.0.0.1 (17 May 2006 12:18:34 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Wed, 17 May 2006 12:18:34 +0000 (UTC)
In-Reply-To: <200605162137.k4GLb6CG006212@envy.delorie.com>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: j73g2000cwa.googlegroups.com; posting-host=65.13.115.246;
posting-account=qvj7NA0AAABallzf-E3FtUCXEd65I-J8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Okay, here's a silly little example:

/* TEST.C */
#include <stdio.h>
int main() {
puts("Hello, world");
return 0;
}
/* <EOF> */

gcc -s -Wall -O2 test.c -S -o testone.s
gcc -s -Wall -O2 -fomit-frame-pointer test.c -S -o testtwo.s
fc testone.s testtwo.s | more

The results are not the same. Should they be?


DJ Delorie wrote:
> The option means gcc *can* omit it, but there are often reasons why it
> must have a frame pointer anyway (alloca is one, for example).  We'd
> need to see a code sample and command line to diagnose it further.

- Raw text -


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