I'm just playing around with gcc (g++) and the compilerflags -msse and -msse2. I have a little test program which looks like that:
#include <iostream>
int main(int argc, char **argv) {
float a = 12558.5688;
float b = 6.5585;
float result = 0.0;
result = a * b;
std::cout << "Result: " << result << std::endl;
return 0;
}
When I compile it with the following statements:
/usr/local/bin/g++-4.9 -W -msse main.cpp -o testsse
and
/usr/local/bin/g++-4.9 -W -msse2 main.cpp -o testsse2
the output files are binary equal. But I've expected that they are not the same because of the SMID flags.
So my question is, do those complier flags do not have any influence on the binary file? I've tested it on OS X 10.10.3 and Fedora 21.
Thanks for your help.
Kind regards
Fabian