I read the documentation about compilation-mode but I didn't find any technique to hightlight source code where a compilation error occurs.
For example change the background color of the source code that produces the compilation error (like the red underline in Eclipse or Netbeans). And also a way to read the error message somewhere.
Normally, compilation mode will highlight the error message in the compiler output and you can use that to jump to the code. If you want your code syntax checked/highlighted you might want to look at flymake, which is supposed to be able to do exactly that.