Oracle® Solaris Studio 12.4: C++ User's Guide

Exit Print View

Updated: March 2015
 
 

2.5.1 Pragmas

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.

Oracle Solaris Studio C++ also supports the C99 keyword _Pragma. The following two invocations are equivalent:

#pragma dumpmacros(defs)     
_Pragma("dumpmacros(defs)") 

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.