Not true. In gcc you have -Wunused-... if you want to be warned.
after all there's no way to ignore unused variables with a compiler option
It might be a good idea to add it to your build bot though, this way you can enforce it for commited code. That's a good compromise IMO.