ROSE  0.11.145.0
rose_pragma_message.h
1 #ifndef ROSE_PRAGMA_MESSAGE_H
2 #define ROSE_PRAGMA_MESSAGE_H
3 
4 // Converts parameter X to a string after macro replacement
5 #define ROSE_STRINGIZE(X) ROSE_DO_STRINGIZE(X)
6 #define ROSE_DO_STRINGIZE(X) #X
7 
8 // Possibly show a message from the compiler. Argument should be a string literal.
9 #if defined(__INTEL_COMPILER)
10 # define ROSE_PRAGMA_MESSAGE(x) __pragma(message(__FILE__, ":" ROSE_STRINGIZE(__LINE__) ": note: " x))
11 #elif defined(__GNUC__)
12 # define ROSE_PRAGMA_MESSAGE(x) _Pragma(ROSE_STRINGIZE(message(x)))
13 #elif defined(_MSC_VER)
14 # define ROSE_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ ":" ROSE_STRINGIZE(__LINE__) ": note: " x))
15 #else
16 # define ROSE_PRAGMA_MESSAGE(x) /*silent*/
17 #endif
18 
19 #endif