As long as you understand that code samples written by others are more likely to lead to warnings with -Wall, then yes, this is a good flag because it will make you used to writing code free of any potential gray area that the compiler may to identify.
-pedantic, on the other hand, is a more complex case. This is what the GCC 4.4.4 man page says:
, ISO C ISO ++; , , , ISO C ISO ++. ISO C ISO C, -std.
ISO C ISO ++ ( -ansi -std, ISO C). GNU C ++. , .
-pedantic , __. Pedantic , __ __ ". , ; .
-pedantic ISO C. , , : , ISO, - , ISO C , , .
, ISO C, -. .