recommended_C++_options

recommended_C++_options - Printed by Dick Furnstahl Jan 01,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
[The following is based on the recommended gcc options from the Reference Manual for the GNU Scientific Library --- Debugging Numerical Programs] C++ options for numerical programs Writing reliable and portable numerical programs in C++ requires care. It is a good practice to compile and test your program with (at least) two different compilers. The following minimum g++ (GNU compiler) and icpc (Intel compiler) options are recommended when compiling numerical programs: g++ -Werror -Wall -W -Wshadow -fno-common -g -O3 icpc -Werror -Wall -fno-common -g -O3 The following list gives a brief explanation of what types of errors these options catch. -Werror Consider warnings to be errors, so that compilation stops. This prevents warnings from scrolling off the top of the screen and being lost. You won’t be able to compile the program until it is completely warning-free. You may be tempted to remove this. DON’T! -Wall
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/30/2011 for the course PHYSICS 780 taught by Professor Furnstahl during the Winter '11 term at Ohio State.

Page1 / 2

recommended_C++_options - Printed by Dick Furnstahl Jan 01,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online