This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Order of passing optimization flags to gcc


On 14 October 2015 at 05:50, Mohamed Boussaa wrote:
> I would like to define a set of 10 optimization options to an input C program.
> example: gcc -fauto-inc-dec -fbranch-count-reg
> -fcombine-stack-adjustments ... test.c -o out.o
> Does the order of these options affect the effectiveness of the produced code?

No.

The only time the order of options makes a difference is for options
that cancel or override each other, in which case the last such
options wins.

For example, given -ffoo -fno-foo the order matters, and given
-march=i586 -march=i686 the order matters.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]