Arduino sketch compiler

If you enable verbose compilation in the newest IDE, it should give you warnings (which include unused variables, etc). The compiler is gcc 4.3.2 (actually avr-gcc), and if you go into <ARDUINO_DIR>/hardware/tools and move the avr directory, the IDE will try to find avr-gcc in your PATH (so you could write a script called avr-gcc that passes all arguments except -w and adds -Wall to the real avr-gcc if you don't want to use verbose mode).

What version the IDE do you have?