This is the mail archive of the
mailing list for the GCC project.
Default value for -march option
- From: Anthony S <ast_dev at ymail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 17 Dec 2012 04:12:14 -0800 (PST)
- Subject: Default value for -march option
- Reply-to: Anthony S <ast_dev at ymail dot com>
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