Default value for -march option

Anthony S ast_dev@ymail.com
Mon Dec 17 12:12:00 GMT 2012


What is the default value for -march option on all platforms generally and on x86_64 particularly?

I've compiled some code with gcc using these options:

-g -O3 -fstrength-reduce -Werror -Wall -Wpointer-arith 


See that -march is not set explicitly. Code was compiled on i3 and I've found that generated executable contains AVX instructions (it failed with SIGILL in VirtualBox, VirtualBox does not support AVX yet)

There is no information about default -march value in GCC docs, and I think that sane default value should not be -march=native or core-avx-i. Compiler should include  modern instructionsonly if it is explicitly told to do so

GCC version where this problem was found is 4.6.3



More information about the Gcc-help mailing list