I'm working with the default C++ compiler (I guess it's called the "Visual Studio C++ compiler") that comes with Visual Studio 2013 with the flag /Ox
(Full Optimization). Due to floating point side effects, I must disable the -ffast-math
flag when using the gcc
compiler. Is there an equivalent option for this flag in the configuration of the Visual Studio C++ compiler?
相关问题
- Custom controls disabled. There was an internal is
- Error building gcc 4.8.3 from source: libstdc++.so
- What are the recommended GNU linker options to spe
- What is the right order of linker flags in gcc?
- Why doesn't g++ -Wconversion warn about conver
相关文章
- Web Test recorder does not allow me to record a te
- The program '[4432] iisexpress.exe' has ex
- gcc/g++ gives me error “CreateProcess: No such fil
- Calls that precede a function's definition can
- How can I use gcc's -I command to add recursiv
- How do I know if std::map insert succeeded or fail
- How to disable CodeLens' references display in
- Breakpoint in ASP.NET MVC Razor view will not be h
None of the MSVC++ options enable the optimizations which are invoked by g++
-ffast-math
.You are looking for
/fp:precise
, although that is also the default.If you need the strictest floating point calculations that VS can offer, try
/fp:strict
, although that is probably overkill.You probably have nothing to worry about since the default behavior should be what you desire. Just make sure that
/fp:fast
is not specified, but if you try to compile with both/fp:fast
and/fp:precise
you will get a compilation error anyway, so that should be easy to catch.The link that Hans Passant provided to the MSDN website provides all the details you might want.