JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: C User's Guide
search filter icon
search icon

Document Information


1.  Introduction to the C Compiler

2.  C-Compiler Implementation-Specific Information

3.  Parallelizing C Code

4.  lint Source Code Checker

5.  Type-Based Alias Analysis

6.  Transitioning to ISO C

7.  Converting Applications for a 64-Bit Environment

8.  cscope: Interactively Examining a C Program

A.  Compiler Options Grouped by Functionality

B.  C Compiler Options Reference

B.1 Option Syntax

B.2 The cc Options

B.2.1 -#

B.2.2 -###

B.2.3 -Aname[(tokens)]

B.2.4 -B[static|dynamic]

B.2.5 -C

B.2.6 -c

B.2.7 -Dname[(arg[,arg])][=expansion]

B.2.8 -d[y|n]

B.2.9 -dalign

B.2.10 -E

B.2.11 -errfmt[=[no%]error]

B.2.12 -errhdr[=h]

B.2.13 -erroff[=t]

B.2.14 -errshort[=i]

B.2.15 -errtags[=a]

B.2.16 -errwarn[=t]

B.2.17 -fast

B.2.18 -fd

B.2.19 -features=[v]

B.2.20 -flags

B.2.21 -flteval[={any|2}]

B.2.22 -fma[={none|fused}]

B.2.23 -fnonstd

B.2.24 -fns[={no|yes}]

B.2.25 -fPIC

B.2.26 -fpic

B.2.27 -fprecision=p

B.2.28 -fround=r

B.2.29 -fsimple[=n]

B.2.30 -fsingle

B.2.31 -fstore

B.2.32 -ftrap=t[,t...]

B.2.33 -G

B.2.34 -g

B.2.35 -H

B.2.36 -h name

B.2.37 -I[-|dir]

B.2.38 -i

B.2.39 -include filename

B.2.40 -KPIC

B.2.41 -Kpic

B.2.42 -keeptmp

B.2.43 -Ldir

B.2.44 -lname

B.2.45 -m32|-m64

B.2.46 -mc

B.2.47 -misalign

B.2.48 -misalign2

B.2.49 -mr[,string]

B.2.50 -mt[={yes|no}]

B.2.50.1 See Also

B.2.51 -native

B.2.52 -nofstore

B.2.53 -O

B.2.54 -o filename

B.2.55 -P

B.2.56 -p

B.2.57 -Q[y|n]

B.2.58 -qp

B.2.59 -Rdir[:dir]

B.2.60 -S

B.2.61 -s

B.2.62 -traceback[={%none|common|signals_list}]

B.2.63 -Uname

B.2.64 -V

B.2.65 -v

B.2.66 -Wc,arg

B.2.67 -w

B.2.68 -X[c|a|t|s]

B.2.69 -x386

B.2.70 -x486

B.2.71 -xaddr32[=yes|no]

B.2.72 -xalias_level[=l]

B.2.73 -xannotate[=yes|no]

B.2.74 -xarch=isa

B.2.74.1 -xarch Flags for SPARC

B.2.74.2 -xarch Flags for x86

B.2.74.3 Special x86 Notes

B.2.74.4 Binary Compatibility Verification

B.2.74.5 Interactions

B.2.74.6 Warnings

B.2.75 -xautopar

B.2.76 -xbinopt={prepare|off}

B.2.77 -xbuiltin[=(%all|%none)]

B.2.78 -xCC

B.2.79 -xc99[=o]

B.2.80 -xcache[=c]

B.2.81 -xcg[89|92]

B.2.82 -xchar[=o]

B.2.83 -xchar_byte_order[=o]

B.2.84 -xcheck[=o]

B.2.84.1 Initialization Values for --xcheck=init_local

Basic Types

Initializing Structs, Unions, and Arrays

B.2.85 -xchip[=c]

B.2.86 -xcode[=v]

B.2.87 -xcrossfile

B.2.88 -xcsi

B.2.89 -xdebugformat=[stabs|dwarf]

B.2.90 -xdepend=[yes|no]

B.2.91 -xdryrun

B.2.92 -xe

B.2.93 -xF[=v[,v...]]

B.2.93.1 Values

B.2.94 -xhelp=f

B.2.95 -xhwcprof

B.2.96 -xinline=list

B.2.97 -xinstrument=[no%]datarace

B.2.98 -xipo[=a]

B.2.98.1 Examples

B.2.98.2 When Not To Use -xipo=2 Interprocedural Analysis

B.2.99 -xipo_archive=[a]

B.2.100 -xjobs=n

B.2.101 -xldscope={v}

B.2.102 -xlibmieee

B.2.103 -xlibmil

B.2.104 -xlibmopt

B.2.105 -xlic_lib=sunperf

B.2.106 -xlicinfo

B.2.107 -xlinkopt[=level]

B.2.108 -xloopinfo

B.2.109 -xM

B.2.110 -xM1

B.2.111 -xMD

B.2.112 -xMF filename

B.2.113 -xMMD

B.2.114 -xMerge

B.2.115 -xmaxopt[=v]

B.2.116 -xmemalign=ab

B.2.117 -xmodel=[a]

B.2.118 -xnolib

B.2.119 -xnolibmil

B.2.120 -xnolibmopt

B.2.121 -xnorunpath

B.2.122 -xO[1|2|3|4|5]

B.2.122.1 Explanation of SPARC Optimizations

B.2.122.2 Explanation of x86 Optimizations

B.2.123 -xopenmp[=i]

B.2.124 -xP

B.2.125 -xpagesize=n

B.2.126 -xpagesize_heap=n

B.2.127 -xpagesize_stack=n

B.2.128 -xpch=v

B.2.128.1 Creating a Precompiled-Header File Automatically

B.2.128.2 Creating a Precompiled-Header File Manually

B.2.128.3 How the Compiler Handles an Existing Precompiled-Header File

B.2.128.4 Directing the Compiler to Use a Specific Precompiled-Header File

B.2.128.5 The Viable Prefix

B.2.128.6 Screening a Header File for Problems

B.2.128.7 The Precompiled-Header File Cache

B.2.128.8 Warnings

B.2.128.9 Precompiled-Header File Dependencies and make Files

B.2.129 -xpchstop=[file|<include>]

B.2.130 -xpec[={yes|no}]

B.2.131 -xpentium

B.2.132 -xpg

B.2.133 -xprefetch[=val[,val]]

B.2.133.1 Prefetch Latency Ratio

B.2.134 -xprefetch_auto_type=a

B.2.135 -xprefetch_level=l

B.2.136 -xprofile=p

B.2.137 -xprofile_ircache[=path]

B.2.138 -xprofile_pathmap

B.2.139 -xreduction

B.2.140 -xregs=r[,r...]

B.2.141 -xrestrict[=f]

B.2.142 -xs

B.2.143 -xsafe=mem

B.2.144 -xsb

B.2.145 -xsbfast

B.2.146 -xsfpconst

B.2.147 -xspace

B.2.148 -xstrconst

B.2.149 -xtarget=t

B.2.149.1 -xtarget Values on SPARC Platforms

B.2.149.2 -xtarget Values on x86 Platforms

B.2.150 -xtemp=dir

B.2.151 -xthreadvar[=o]

B.2.152 -xtime

B.2.153 -xtransition

B.2.154 -xtrigraphs

B.2.155 -xunroll=n

B.2.156 -xustr={ascii_utf16_ushort|no}

B.2.157 -xvector[=a]

B.2.158 -xvis

B.2.159 -xvpara

B.2.160 -Yc, dir

B.2.161 -YA, dir

B.2.162 -YI, dir

B.2.163 -YP, dir

B.2.164 -YS, dir

B.2.165 -Zll

B.3 Options Passed to the Linker

C.  Implementation-Defined ISO/IEC C99 Behavior

D.  Supported Features of C99

E.  Implementation-Defined ISO/IEC C90 Behavior

F.  ISO C Data Representations

G.  Performance Tuning

H.  The Differences Between K&R Solaris Studio C and Solaris Studio ISO C


B.3 Options Passed to the Linker

cc recognizes -a, -e, -r, -t, -u, and -z and passes these options and their arguments to ld. cc passes any unrecognized options to ld with a warning. On Solaris platforms, the -i option and its arguments are also passed to the linker.