I use the -std=c++11 -Wall -Wextra -pedantic options.
The first one makes the compiler cope with the C++ 2011 standard - That is letting you do C++11 code - but don't worry about that for now.
-Wall prints out most of the errors in your code.
-Wextra does even more errors that strangely aren't included in -Wall
-pedantic does even further errors, but these are still handy sometimes
If you leave out these options, the compiler won't warn you about as many potential problems, there is a bit of a default level of
The gcc man page has zillions of options, but these ones will do for most things.
The description of warnings start at line 2078 of gcc man on my system. It worth reading some of this - although rather boring.