Mail Archives: djgpp/2006/05/17/08:34:03

X-Authentication-Warning: 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
Lines: 22
Message-ID: <>
References: <1147811247 DOT 971831 DOT 35000 AT i40g2000cwc DOT googlegroups DOT com>
<200605162137 DOT k4GLb6CG006212 AT envy DOT delorie DOT com>
Mime-Version: 1.0
X-Trace: 1147868314 18957 (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: <>
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060426 Firefox/,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse AT google DOT com
Injection-Info:; posting-host=;
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