The preprocessor directive pragma is part of the C++ standard, but the form, content, and meaning of pragmas is different for every compiler. See Appendix B, Pragmas for details on the pragmas that the C++ compiler recognizes.
Sun C++ also supports the C99 keyword _Pragma. The two invocations
#pragma dumpmacros(defs) _Pragma("dumpmacros(defs)") |
are equivalent. To use _Pragma instead of #pragma, write the pragma text as a literal string, enclosed in parentheses as the one argument of the _Pragma keyword.