- To: gcc-help@xxxxxxxxxxx
- Subject: Regarding -fno optimization options
- From: Parang Saraf <parang.saraf@xxxxxxxxx>
- Date: Wed, 25 Jul 2012 02:34:25 -0400
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- In-reply-to: <CAOS5qvT0qCXO=WoNqu9LFbddaS_O0c5O1CxsTAUy-BZq0pC8+A@mail.gmail.com>
Hi,
I have few very basic questions:
1. I want to turn-on only some of the optimization flags for O1. Is
doing this enough?:
" gcc -O0 -fcprop-registers -fdefer-pop -fif-conversion [...] -o
program program.c "
I tried with a bunch of options, generated an assembly file and
compared the assembly file with the assembly generated from just -O0.
Ideally, there should be a difference. Right?
2. Secondly, if I can switch-on flags like this, then what is the need
for -fno optimization options? Are -fno options meant just to reduce
the number of command line options, ie. say if for O1 I want most of
the flags except a few, then I can do "-O1 -fno-flag" ? If that's the
case, then why not all the flags have a -fno switch.
3. In the gcc 4.7.1 optimization options documentation, there is a line:
" Most optimizations are only enabled if an -O level is set on
the command line. Otherwise they are disabled, even if individual
optimization flags are specified. "
What exactly is the meaning of second line?
Thanks and Regards
Parang
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]