I'm compiling a module which issues a #warning statement. It's a warning that I could safely ignore. At least, I should be able to ignore it except that VC8 insists on converting it to error C1021 which is a fatal error and stops compilation. The actual line looks something like this:-

#warning The warning message
It makes no difference what the message says. I've tried several different messages but they all get converted to error C1021. It almost looks as if my compiler doesn't realise that #warning is a valid pre-processor statement. And yet, according to this MSDN entry #warning has been valid since at least VC6.

I've tried opening the project's properties and selecting different warning levels but none of the settings made any difference. Is there something I need to do to tell the compiler that #warning isn't an error condition?

At the end of the day I could just comment the line out but I'd prefer to understand why it's not working.