- Oracle® Solaris Studio 12.4: C++ User's Guide
- Document Information
- Using This Documentation
- Part I C++ Compiler
- Part II Writing C++ Programs
- Part III Libraries
- Part IV Appendixes
- Appendix A C++ Compiler Options
- A.1 How Option Information Is Organized
- A.2 Option Reference
- A.2.1 -#
- A.2.2 -###
- A.2.3 –Bbinding
- A.2.4 –c
- A.2.5 –cg{89|92}
- A.2.6 –compat={5|g}
- A.2.7 +d
- A.2.8 -Dname[=def]
- A.2.9 –d{y|n}
- A.2.10 –dalign
- A.2.11 –dryrun
- A.2.12 –E
- A.2.13 -erroff[=t]
- A.2.14 -errtags[=a]
- A.2.15 -errwarn[=t]
- A.2.16 –fast
- A.2.17 –features=a[,a...]
- A.2.18 -filt[=filter[,filter...]]
- A.2.19 –flags
- A.2.20 -fma[={none|fused}]
- A.2.21 –fnonstd
- A.2.22 –fns[={yes|no}]
- A.2.23 -fopenmp
- A.2.24 –fprecision=p
- A.2.25 –fround=r
- A.2.26 –fsimple[=n]
- A.2.27 –fstore
- A.2.28 -ftrap=t[,t...]
- A.2.29 –G
- A.2.30 -g
- A.2.31 –g[n]
- A.2.32 –H
- A.2.33 –h[ ]name
- A.2.34 –help
- A.2.35 -Ipathname
- A.2.36 -I-
- A.2.37 –i
- A.2.38 include
filename
- A.2.39 -inline
- A.2.40 –instances=a
- A.2.41 –instlib=filename
- A.2.42 –KPIC
- A.2.43 –Kpic
- A.2.44 –keeptmp
- A.2.45 –Lpath
- A.2.46 –llib
- A.2.47 –libmieee
- A.2.48 –libmil
- A.2.49 -library=l[,l...]
- A.2.50 m32|m64
- A.2.51 -mc
- A.2.52 –misalign
- A.2.53 -mr[,string]
- A.2.54 -mt[={yes|no}]
- A.2.55 –native
- A.2.56 –noex
- A.2.57 –nofstore
- A.2.58 –nolib
- A.2.59 –nolibmil
- A.2.60 –norunpath
- A.2.61 –O
- A.2.62 –Olevel
- A.2.63 –o
filename
- A.2.64 +p
- A.2.65 –P
- A.2.66 –p
- A.2.67 –pentium
- A.2.68 –pg
- A.2.69 -PIC
- A.2.70 –pic
- A.2.71 –preserve_argvalues[=simple|none]
- A.2.72 –pta
- A.2.73 –ptipath
- A.2.74 –pto
- A.2.75 –ptv
- A.2.76 –Qoption
phase option[,option…]
- A.2.77 –qoption
phase option
- A.2.78 –qp
- A.2.79 –Qproduce
sourcetype
- A.2.80 –qproduce
sourcetype
- A.2.81 –Rpathname[:pathname…]
- A.2.82 –S
- A.2.83 –s
- A.2.84 -staticlib=l[,l…]
- A.2.85 -std=v
- A.2.86 -sync_stdio=[yes|no]
- A.2.87 –temp=path
- A.2.88 –template=opt[,opt…]
- A.2.89 –time
- A.2.90 -traceback[={%none|common|signals_list}]
- A.2.91 –Uname
- A.2.92 –unroll=n
- A.2.93 –V
- A.2.94 –v
- A.2.95 –verbose=v[,v…]
- A.2.96 -Wc,arg
- A.2.97 +w
- A.2.98 +w2
- A.2.99 –w
- A.2.100 -Xlinker
arg
- A.2.101 –Xm
- A.2.102 -xaddr32
- A.2.103 -xalias_level[=n]
- A.2.104 -xanalyze={code|%none}
- A.2.105 -xannotate[=yes|no]
- A.2.106 –xar
- A.2.107 –xarch=isa
- A.2.108 -xautopar
- A.2.109 -xbinopt={prepare|off}
- A.2.110 -xbuiltin[={%all|%default|%none}]
- A.2.111 –xcache=c
- A.2.112 -xchar[=o]
- A.2.113 -xcheck[=i[,i]]
- A.2.114 -xchip=c
- A.2.115 –xcode=a
- A.2.116 -xdebugformat=[stabs|dwarf]
- A.2.117 -xdebuginfo=a[,a...]
- A.2.118 -xdepend=[yes|no]
- A.2.119 -xdumpmacros[=value[,value...]]
- A.2.120 -xe
- A.2.121 xF[=v[,v...]]
- A.2.122 -xglobalize[={yes|no}]
- A.2.123 -xhelp=flags
- A.2.124 -xhwcprof
- A.2.125 -xia
- A.2.126 -xinline[=func-spec[,func-spec...]]
- A.2.127 xinline_param=a[,a[,a]...]
- A.2.128 xinline_report[=n]
- A.2.129 xinstrument=[no%]datarace
- A.2.130 -xipo[={0|1|2}]
- A.2.131 -xipo_archive=[a]
- A.2.132 -xipo_build=[yes|no]
- A.2.133 -xivdep[=p]
- A.2.134 -xjobs{=n|auto}
- A.2.135 -xkeep_unref[={[no%]funcs,[no%]vars}]
- A.2.136 -xkeepframe[=[%all,%none,name,no%name]]
- A.2.137 -xlang=language[,language]
- A.2.138 -xldscope={v}
- A.2.139 -xlibmieee
- A.2.140 -xlibmil
- A.2.141 –xlibmopt
- A.2.142 –xlic_lib=sunperf
- A.2.143 –xlicinfo
- A.2.144 -xlinkopt[=level]
- A.2.145 -xloopinfo
- A.2.146 –xM
- A.2.147 -xM1
- A.2.148 -xMD
- A.2.149 -xMF
- A.2.150 -xMMD
- A.2.151 –xMerge
- A.2.152 -xmaxopt[=v]
- A.2.153 -xmemalign=ab
- A.2.154 -xmodel=[a]
- A.2.155 –xnolib
- A.2.156 –xnolibmil
- A.2.157 –xnolibmopt
- A.2.158 xnorunpath
- A.2.159 -xOlevel
- A.2.160 -xopenmp[={parallel|noopt|none}]
- A.2.161 -xpagesize=n
- A.2.162 -xpagesize_heap=n
- A.2.163 -xpagesize_stack=n
- A.2.164 -xpatchpadding[={fix|patch|size}]
- A.2.165 -xpch=v
- A.2.166 -xpchstop=file
- A.2.167 -xpec[={yes|no}]
- A.2.168 –xpg
- A.2.169 -xport64[=(v)]
- A.2.170 -xprefetch[=a[,a...]]
- A.2.171 -xprefetch_auto_type=a
- A.2.172 -xprefetch_level[=i]
- A.2.173 -xprevise={yes|no}
- A.2.174 –xprofile=p
- A.2.175 -xprofile_ircache[=path]
- A.2.176 -xprofile_pathmap
- A.2.177 -xreduction
- A.2.178 –xregs=r[,r...]
- A.2.179 -xrestrict[=f]
- A.2.180 –xs[={yes|no}]
- A.2.181 –xsafe=mem
- A.2.182 -xsegment_align=n
- A.2.183 –xspace
- A.2.184 –xtarget=t
- A.2.185 -xtemp=path
- A.2.186 -xthreadvar[=o]
- A.2.187 -xthroughput[={yes|no}]
- A.2.188 –xtime
- A.2.189 -xtrigraphs[={yes|no}]
- A.2.190 -xunboundsym={yes|no}
- A.2.191 –xunroll=n
- A.2.192 -xustr={ascii_utf16_ushort|no}
- A.2.193 -xvector[=a]
- A.2.194 -xvis[={yes|no}]
- A.2.195 xvpara
- A.2.196 –xwe
- A.2.197 -Yc,path
- A.2.198 -z[ ]arg
- Appendix B Pragmas
- Glossary
- Index
Index
Numbers and Symbols
- ! NOT operator, iostream
- Handling Input Errors
- Handling Output Errors
- —###, compiler option-###
- —#, compiler option-#
- $ identifier, allowing as noninitial-features Values
- -Bbinding, compiler option
- –Bbinding
- Building Shared Libraries That Have Exceptions
- -c, compiler option
- –c
- Separate Compiling and Linking
- -compat
- compiler option–compat={5|g}
- -D, compiler option
- -Dname[=def]
- General Guidelines
- -d, compiler option–d{y|n}
- -DDEBUGTemplate Instance Automatic Consistency With -instances=extern
- -dryrun, compiler option
- –dryrun
- Understanding the Compiler Organization
- -E compiler option–E
- -erroff compiler option-erroff[=t]
- -errtags compiler option-errtags[=a]
- -errwarn compiler option-errwarn[=t]
- -fast, compiler option–fast
- -features, compiler option
- –features=a[,a...]
- Thread Cancellation
- Disabling Exceptions
- Language Extensions
- -filt, compiler option-filt[=filter[,filter...]]
- -flags, compiler option–flags
- -fnonstd, compiler option–fnonstd
- -fns, compiler option–fns[={yes|no}]
- -fopenmp, compiler option-fopenmp
- -fprecision=p, compiler option–fprecision=p
- -fround=r, compiler option–fround=r
- -fsimple=n, compiler option–fsimple[=n]
- -ftrap, compiler option-ftrap=t[,t...]
- -g-g
- compiling templates usingTemplate Instance Automatic Consistency With -instances=extern
- -G
- dynamic library commandBuilding Dynamic (Shared) Libraries
- option description–G
- -g
- option description–g[n]
- -H, compiler option–H
- -h, compiler option–h[ ]name
- -help, compiler option–help
- -I, compiler option
- -I-
- -Ipathname
- Definitions Search Path
- -i, compiler option–i
- -include, compiler optioninclude
filename
- -inline, See -xinline-inline
- -instances=a, compiler option
- –instances=a
- Template Instance Placement and Linkage
- -instlib, compiler option–instlib=filename
- -keeptmp, compiler option–keeptmp
- -Kpic, compiler option
- –Kpic
- Building Dynamic (Shared) Libraries
- -KPIC, compiler option
- –KPIC
- Building Dynamic (Shared) Libraries
- -l, compiler option
- –llib
- Related Library Options
- C Libraries
- General Guidelines
- -L, compiler option
- –Lpath
- Related Library Options
- -libmieee, compiler option–libmieee
- -libmil, compiler option–libmil
- -library, compiler option
- -library=l[,l...]
- Statically Linking Standard Libraries
- Linking C++ Libraries
- Related Library Options
- -lthread compiler option
- suppressed by -xnolibStatically Linking Standard Libraries
- using -mt in place ofBuilding Multithreaded Programs
- -mc, compiler option-mc
- -misalign, compiler option–misalign
- -mr, compiler option-mr[,string]
- -mt compiler option
- linking librariesC Libraries
- option description-mt[={yes|no}]
- -native, compiler option–native
- -noex, compiler option
- –noex
- Thread Cancellation
- -nofstore, compiler option–nofstore
- -nolib, compiler option
- –nolib
- Related Library Options
- -nolibmil, compiler option–nolibmil
- -norunpath, compiler option
- –norunpath
- Related Library Options
- -O, compiler option–O
- -o, compiler option–o
filename
- -Olevel, compiler option–Olevel
- -P, compiler option–P
- -pentium, compiler option–pentium
- -pg, compiler option–pg
- -PIC, compiler option-PIC
- -pic, compiler option–pic
- -preserve_argvalues
- compiler option–preserve_argvalues[=simple|none]
- -pta, compiler option–pta
- -pti, compiler option
- –ptipath
- Definitions Search Path
- -pto, compiler option–pto
- -ptv, compiler option–ptv
- -Qoption, compiler option–Qoption
phase option[,option…]
- -qoption, compiler option–qoption
phase option
- -qp, compiler option–qp
- -Qproduce, compiler option–Qproduce
sourcetype
- -qproduce, compiler option–qproduce
sourcetype
- -R, compiler option
- –Rpathname[:pathname…]
- Related Library Options
- -S, compiler option–S
- -s, compiler option–s
- -staticlib, compiler option
- -staticlib=l[,l…]
- Statically Linking Standard Libraries
- Related Library Options
- -sync_stdio, compiler option-sync_stdio=[yes|no]
- -temp=dir, compiler option–temp=path
- -template, compiler option
- –template=opt[,opt…]
- Template Definition Searching
- Whole-Class Instantiation
- -time, compiler option–time
- -U, compiler option
- –Uname
- General Guidelines
- -unroll=n, compiler option–unroll=n
- -v, compiler option
- –v
- Understanding the Compiler Organization
- -V, compiler option–V
- -verbose, compiler option
- –verbose=v[,v…]
- Verbose Compilation
- -W command-line option-Wc,arg
- -w, compiler option–w
- -xaddr32 compiler option-xaddr32
- -xalias_level, compiler option-xalias_level[=n]
- -xanalyze, compiler option-xanalyze={code|%none}
- -xannotate, compiler option-xannotate[=yes|no]
- -xar, compiler option
- –xar
- Building Static (Archive) Libraries
- External Instances
- -xarch=isa, compiler option–xarch=isa
- -xautopar, compiler option-xautopar
- -xbinopt compiler option-xbinopt={prepare|off}
- -xbinopt, compiler option-xbinopt={prepare|off}
- -xbuiltin, compiler option-xbuiltin[={%all|%default|%none}]
- -xcache=c, compiler option–xcache=c
- -xcg, compiler option–cg{89|92}
- -xchar, compiler option-xchar[=o]
- -xcheck, compiler option-xcheck[=i[,i]]
- -xchip=c, compiler option-xchip=c
- -xcode=a, compiler option–xcode=a
- -xdebugformat compiler option-xdebugformat=[stabs|dwarf]
- -xdebuginfo-xdebuginfo=a[,a...]
- -xdepend, compiler option-xdepend=[yes|no]
- -xdumpmacros, compiler option-xdumpmacros[=value[,value...]]
- -xe, compiler option
- -xe
- -xe
- -xF, compiler optionxF[=v[,v...]]
- -xglobalize-xglobalize[={yes|no}]
- -xhelp=flags, compiler option-xhelp=flags
- -xhreadvar, compiler option-xthreadvar[=o]
- -xhwcprof compiler option-xhwcprof
- -xia, compiler option-xia
- -xinline, compiler option-xinline[=func-spec[,func-spec...]]
- -xinline_paramxinline_param=a[,a[,a]...]
- -xinline_reportxinline_report[=n]
- -xipo, compiler option-xipo[={0|1|2}]
- -xipo_archive compiler option-xipo_archive=[a]
- -xipo_build compiler option-xipo_build=[yes|no]
- -xivdep, compiler option-xivdep[=p]
- -xjobs, compiler option-xjobs{=n|auto}
- -xkeepframe, compiler option-xkeepframe[=[%all,%none,name,no%name]]
- -xlang, compiler option-xlang=language[,language]
- -xldscope, compiler option
- -xldscope={v}
- Linker Scoping
- -xlibmieee, compiler option-xlibmieee
- -xlibmil, compiler option-xlibmil
- -xlibmopt, compiler option–xlibmopt
- -xlic_lib, compiler option–xlic_lib=sunperf
- -xlicinfo, compiler option–xlicinfo
- -Xlinker, compiler option-Xlinker
arg
- -xlinkopt, compiler option-xlinkopt[=level]
- -xloopinfo, compiler option-xloopinfo
- -xM1, compiler option-xM1
- -Xm, compiler option–Xm
- -xM, compiler option–xM
- -xmaxopt compiler option-xmaxopt[=v]
- -xmaxopt, compiler option-xmaxopt[=v]
- -xMD, compiler option-xMD
- -xmemalign, compiler option-xmemalign=ab
- -xMerge, compiler option–xMerge
- -xMF, compiler option-xMF
- -xMMD, compiler option-xMMD
- -xmodel, compiler option-xmodel=[a]
- -xnolib, compiler option
- –xnolib
- Statically Linking Standard Libraries
- Related Library Options
- -xnolibmil, compiler option–xnolibmil
- -xnolibmopt, compiler option–xnolibmopt
- -xOlevel, compiler option-xOlevel
- -xopenmp, compiler option-xopenmp[={parallel|noopt|none}]
- -xpagesize, compiler option-xpagesize=n
- -xpagesize_heap, compiler option-xpagesize_heap=n
- -xpagesize_stack, compiler option-xpagesize_stack=n
- -xpec, compiler option-xpec[={yes|no}]
- -xpg, compiler option–xpg
- -xport64, compiler option-xport64[=(v)]
- -xprefetch, compiler option-xprefetch[=a[,a...]]
- -xprefetch_auto_type, compiler option-xprefetch_auto_type=a
- -xprefetch_level, compiler option-xprefetch_level[=i]
- -xprevise, compiler option-xprevise={yes|no}
- -xprofile_ircache, compiler option-xprofile_ircache[=path]
- -xprofile_pathmap, compiler option-xprofile_pathmap
- -xpxpatchpadding, compiler option-xpatchpadding[={fix|patch|size}]
- -xreduction, compiler option-xreduction
- -xregs compiler option–xregs=r[,r...]
- -xregs, compiler option
- –xregs=r[,r...]
- Building Libraries for Public Use
- -xrestrict, compiler option-xrestrict[=f]
- -xs, link debug information from object files into executable–xs[={yes|no}]
- -xsafe=mem, compiler option–xsafe=mem
- -xsegment_align, compiler option-xsegment_align=n
- -xspace, compiler option–xspace
- -xtarget=t, compiler option–xtarget=t
- -xtemp-xtemp=path
- -xthroughput, compiler option-xthroughput[={yes|no}]
- -xtime, compiler option–xtime
- -xtrigraphs, compiler option-xtrigraphs[={yes|no}]
- -xunboundsym, compiler option-xunboundsym={yes|no}
- -xunroll=n, compiler option–xunroll=n
- -xustr, compiler option-xustr={ascii_utf16_ushort|no}
- -xvector, compiler option-xvector[=a]
- -xvis, compiler option-xvis[={yes|no}]
- -xvpara, compiler optionxvpara
- -xwe, compiler option–xwe
- -z arg, compiler option-z[ ]arg
- .a, file name suffix
- Understanding Libraries
- File Name Suffixes Recognized by the C++ Compiler
- .c++, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .c, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .C, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .cpp, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .cxx, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .d file extension-xMF
- .i, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .il, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .o files
- option suffixesFile Name Suffixes Recognized by the C++ Compiler
- preservingCompile-Link Sequence
- .s, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .S, file name suffixesFile Name Suffixes Recognized by the C++ Compiler
- .so.n, file name suffixFile Name Suffixes Recognized by the C++ Compiler
- .so, file name suffix
- Understanding Libraries
- File Name Suffixes Recognized by the C++ Compiler
- .SUNWCCh file name suffixStandard Header Implementation
- \>\> extraction operator
- iostreamInput Using iostream
- __attribute__Supported Attributes
- __cplusplus, predefined macroLanguage-Adaptable Header Files
- __func__, identifierUsing the Predefined __func__ Symbol for Function Name
- __FUNCTION__, identifierUsing the Predefined __func__ Symbol for Function Name
- __globalLinker Scoping Declaration Specifiers
- __hiddenLinker Scoping Declaration Specifiers
- __STDC__, predefined macroLanguage-Adaptable Header Files
- __symbolicLinker Scoping Declaration Specifiers
- __threadThread-Local Storage
- __VA_ARGS__ identifierMacros With a Variable Number of Arguments