I guess the main question now is, are you testing that your code or the compiler at this point?
Testing the compiler isn't necessarily a bad thing... I've had compiler upgrades mask errors in the past, so it would be nice to ensure that you are getting the same set of safety checks that you expect.
However, you'll have to do a lot of legwork. Your unit test will have to spawn the compiler, capture it's output, and parse it for the correct error statement on the correct line. It's not trivial, and arguably not worth it.
A slightly easier approach might be to keep a directory of bad code, and have a script compile each file one at a time. Have an '#ifdef MAKEFAIL' flag in there that turns on the exact condition that should fail. Ensure the compiler returns 0 when you don't set that flag, and non-zero when you do. That assumes that the compiler returns non-zero on failure... I don't know if MSVC follows that rule.
A third option I'll throw out there, to address portability, is autoconf. It can be a pain to set up, but part of its purpose was to ensure that you have a sane development environment before compiling. You could add a test like this in it, and it let handle finding the compiler and trying it.