Sun Java Solaris Communities My SDN Account Join SDN
 
Compiler Options

Source-Code Options by Language

Sun Studio
Patches
 
Documentation
Code Samples & Apps
Technical Articles & Tips
 
Forums
Blogs
 
 
 

  • See the C++ list
  • See the F95 list

C Source Code Options

Option Meaning
-A Associate a predicate with the specified tokens as if by a #assert preprocessing directive.
-Dname Defines a macro symbol name to the preprocessor.
-E Directs the CC driver to only preprocess the C++ source files, and to send the result to stdout (standard output).
-fd Reports K&R style function declarations and definitions.
-H Prints the path name of each include file contained in the current compilation to the standard error output.
-I Adds a pathname to the list of directories that are searched for #include files with relative file paths.
-I- Change the include-file search rules.
-P Only preprocesses source; does not compile.
-X Specifies the degree of conformance to the ISO C standard.
-xCC The compiler accepts C++-style comments when you specify both -xc99=none and -xCC.
-xc99 Controls compiler recognition of the implemented features from the C99 standard (ISO/IEC 9899:1999, Programming Language - C).
-xchar Eases the migration of code from systems where the char type is definedas unsigned.
-xcsi Allows the C compiler to accept source code written in locales that do not conform to the ISO C source character code requirements.
-xM Runs only the preprocessor on the named C++ programs, requesting that it generate makefile dependencies and sendthe result to the standard outputx
-xM1 Same as -xM, except that this option does not report dependencies for the /usr/include header files and it does not report dependencies for compiler-supplied header files.
-xP Performs only syntax and semantic checking on the source file in order to print prototypes for all K&R C functions.
-xsbfast Creates the database for the Source Browser, but does not actually compile.
-xtrigraphs Enables or disables recognition of trigraph sequences as defined by the ISO/ANSI C standard.
-xustr Enables compiler recognition of UTF-16 character strings and literals.

C++ Source Code Options

Option Meaning
-Dname Defines a macro symbol name to the preprocessor.
-E Directs the CC driver to only preprocess the C++ source files, and to send the result to stdout (standard output).
-H Prints the path name of each include file contained in the current compilation to the standard error output.
-I Adds a pathname to the list of directories that are searched for #include files with relative file paths.
-I- Change the include-file search rules.
-P Only preprocesses source; does not compile.
-xchar Eases the migration of code from systems where the char type is definedas unsigned.
-xM Runs only the preprocessor on the named C++ programs, requesting that it generate makefile dependencies and sendthe result to the standard outputx
-xM1 Same as -xM, except that this option does not report dependencies for the /usr/include header files and it does not report dependencies for compiler-supplied header files.
-xtrigraphs Enables or disables recognition of trigraph sequences as defined by the ISO/ANSI C standard.
-xustr Enables compiler recognition of UTF-16 character strings and literals.

F95 Source Code Options

Option Meaning
-Dname Defines a macro symbol name to the preprocessor.
-e Extend source line maximum length to 132 characters.
-fixed Assumes fixed-format source input.
-free Assume free-format source input.
-I Adds a pathname to the list of directories that are searched for #include files with relative file paths.
-U Recognizes upper and lower case in source files.

Related Links