It should be noted that MSVC uses the syntax:
#pragma message ( "your warning text here" )
The usual #warning syntax generates a fatal error
C1021: invalid preprocessor command 'warning'
so it is not portable to those compilers.
More Related Contents:
- “No newline at end of file” compiler warning
- Best compiler warning level for C/C++ compilers? [closed]
- Can placement new for arrays be used in a portable way?
- Where are static variables stored in C and C++?
- How do I see a C/C++ source file after preprocessing in Visual Studio?
- How to detect reliably Mac OS X, iOS, Linux, Windows in C preprocessor? [duplicate]
- Combining C++ and C – how does #ifdef __cplusplus work?
- how does array[100] = {0} set the entire array to 0?
- How to change mode from c++98 mode in Dev-C++ to a mode that supports C++0x (range based for)?
- Define preprocessor macro through CMake?
- C++ preprocessor #define-ing a keyword. Is it standards conforming?
- Do unused functions get optimized out?
- What is difference between sjlj vs dwarf vs seh?
- Namespaces in C
- Template within template: why “`>>’ should be `> >’ within a nested template argument list”
- Update GCC on OSX
- What’s the difference between the WIN32 and _WIN32 defines in C++
- Somehow register my classes in a list
- Understanding stack frame of function call in C/C++? [closed]
- Can I redefine a C++ macro then define it back?
- Template instantiation details of GCC and MS compilers
- Is the backslash acceptable in C and C++ #include directives?
- comparison between string literal
- Two classes that refer to each other
- What is the NDEBUG preprocessor macro used for (on different platforms)?
- C++ Class wrapper around fundamental types
- How can I see the output of the Visual C++ preprocessor? [duplicate]
- What Rules does compiler have to follow when dealing with volatile memory locations?
- #ifdef vs #if – which is better/safer as a method for enabling/disabling compilation of particular sections of code?
- Does an R compiler to C/C++ exist?