views:

82

answers:

0

Possible Duplicate:
user warnings on msvc AND gcc?

I am trying to come up with a relatively clean way of using the preprocessor to generate a custom warning message in C code that works for multiple compilers (MS VC, gcc, AIX, sun, etc).

I am mostly interested in warning about deprecated items, but also just for general use.

I know the Microsoft compiler supports "#pragma deprecated" and "#pragma message", and I've used "#warning" on gcc before. I know "#error" is in the C standard, but I just want a warning I don't want the compile process to stop.

I'm starting to get the feeling that every platform has a different way of doing this, but does anyone have any better ideas or tips?