Sun Studio 12: C User's Guide

A.1.6 Source-Code Options

Table A–6 Source-Code Options Table

Option  

Action  

-A

Associates name as a predicate with the specified tokens as if by a #assert preprocessing directive.

-C

Prevents the preprocessor from removing comments, except those on the preprocessing directive lines.

-D

Associates name with the specified tokens as if by a #define preprocessing directive.

-E

Runs the source file through the preprocessor only and sends the output to stdout.

-fd

Reports K&R-style function definitions and declarations.

-H

Prints to standard error, one per line, the path name of each file included during the current compilation.

-I

Adds directories to the list that is searched for #include files with relative file names.

-P

Runs the source file through the C preprocessor only.

-U

Removes any initial definition of the preprocessor symbol name.

-X

The -X options specify varying degrees of compliance to the ISO C standard.

-xCC

Accepts the C++-style comments.

-xc99

Controls compiler recognition of supported C99 features.

-xchar

Helps with migration from systems where char is defined as 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 send the result to the standard output

-xM1

Collects dependencies like -xM, but excludes /usr/include files.

-xMD

Generates makefile dependencies like -xM but includes compilation.

-xMF

Specifies a filename which stores makefile dependency information.

-xMMD

Generates makefile dependencies but excludes system headers.

-xP

Prints prototypes for all K&R C functions defined in this module

-xpg

Prepares the object code to collect data for profiling with gprof(1).

-xtrigraphs

Determines recognition of trigraph sequences.

-xustr

Enables recognition of string literals composed of sixteen-bit characters.