I am a newbie in C++ programming. When compiling I never use any option.
This is my day to day command:
g++ MyCode.cc -o MyCode
For safety practice what's the best option to use?
I am a newbie in C++ programming. When compiling I never use any option.
This is my day to day command:
g++ MyCode.cc -o MyCode
For safety practice what's the best option to use?
Actually, it's a set:
-Wall -pedantic -std=c++98
Will display all errors and warnings possible and treat them as errors.
When I'm using Boost, though, I drop it down to:
I'm anxiously awaiting GCC 4.4 and 4.5, though. There are some features coming that I really badly need.
I like
-march=athlon -O2 -pipe
for building most programs (I run Gentoo at home), and I use-ansi -pedantic -Wall
for code I write myself.I really need that debug information....
If you thought you caught everything, try
-Wextra